Commits

Gregory Petukhov committed 93dc410

Improve parsing feeds that do not provide post's update information

Comments (0)

Files changed (1)

feedzilla/util/parse.py

     return parsed
 
 
-def parse_modified_date(entry, feed):
+def parse_modified_date(entry, feed, fallback_now=False):
     """
     Find out modified date of feed entry.
     """
         if guessed:
             return guessed
 
+    if fallback_now:
+        return datetime.now()
+
     return None
 
 
             summary = clean_html(summary)
             content = clean_html(content)
 
-            created = parse_modified_date(entry, resp['feed'])
-            if not created:
-                log.error('Post %s does not has modified date' % link)
-                continue
+            created = parse_modified_date(entry, resp['feed'], fallback_now=True)
+            #if not created:
+                #log.error('Post %s does not has modified date' % link)
+                #continue
 
             tags = get_tags(entry)
             guid = sha.new(link.encode('utf-8')).hexdigest()