aboutsummaryrefslogtreecommitdiffstats
path: root/piccast/feeds/management/commands/scrape_feeds.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-04-27 20:37:30 -0400
committerbnewbold <bnewbold@robocracy.org>2011-04-27 20:37:30 -0400
commit481459f41a30c6708c4b18e8200a4d5bcf9cd1e6 (patch)
tree41965aea40d73268bc45571d490b8612ddc39206 /piccast/feeds/management/commands/scrape_feeds.py
parentc0394f2461854b2735aa5ff7b5435b5bc1978498 (diff)
downloadpiccast-481459f41a30c6708c4b18e8200a4d5bcf9cd1e6.tar.gz
piccast-481459f41a30c6708c4b18e8200a4d5bcf9cd1e6.zip
enable is_valid for PicSets, fix sets_by_feed sort
Diffstat (limited to 'piccast/feeds/management/commands/scrape_feeds.py')
-rw-r--r--piccast/feeds/management/commands/scrape_feeds.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/piccast/feeds/management/commands/scrape_feeds.py b/piccast/feeds/management/commands/scrape_feeds.py
index 2371f97..957c596 100644
--- a/piccast/feeds/management/commands/scrape_feeds.py
+++ b/piccast/feeds/management/commands/scrape_feeds.py
@@ -10,7 +10,7 @@ from feeds.models import *
# see Command definition at the end
# this mechanism isn't robust yet b/c any small sets get parsed repeatedly
-MIN_SET_SIZE = 1 # Need to find at least this many images for each set
+MIN_SET_SIZE = 3 # Need to find at least this many images for each set
###############################################################################
def scrape_pics_from_html(pset, html):
@@ -94,7 +94,8 @@ def scrape_pics_acidcow(pset):
if(len(pics) < MIN_SET_SIZE):
print "Didn't find enough pictures to save this set (found " + \
str(len(pics)) + ", MIN_SET_SIZE=" + str(MIN_SET_SIZE) + ")"
- pset.delete()
+ pset.is_valid = False
+ pset.save()
return
# TODO: oh boy, serial, this is a horrible way to do it!