Commit ec7fe5f3 by murtaugh

more debug feedback

parent 69ee7188
......@@ -91,7 +91,7 @@ def wget (url, cachedir, blocksize=4*1000):
count += len(data)
if count > 0:
return path
print ("Unknown content-type", ct, file=sys.stderr)
print ("[wget] skipping {0} content-type {1}".format(url, ct), file=sys.stderr)
return None
def download_url_to_file (href, cachedir):
......@@ -310,6 +310,7 @@ class SiteWeb (object):
def process_feed(self, cachedir, limit=None, phpuploader=None, user=None, force=False, pretend=False):
feed = feedparser.parse(self.feed_url)
# ensure in reverse chronological order (probably redundant but important for the processing)
print ("[process_feed]: {0} items".format(len(feed.entries)), file=sys.stderr)
feed.entries.sort(key=lambda x: PageWeb.get_item_date(x), reverse=True)
# print (feed.entries[0].published_parsed, "to", feed.entries[-1].published_parsed)
count = 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment