Commits

Grigoriy Petukhov committed 87cfa04

Teach parser to process posts without content

Comments (0)

Files changed (2)

feedzilla/util/parse.py

         resp['feed'].last_checked = datetime.now()
 
     for entry in resp['feed'].entries:
-        title = getattr(entry, 'title', 'untitled')
+        # Do not process entries without title
+        if not hasattr(entry, 'title'):
+            continue
+
+        title = entry.title
         link = getattr(entry, 'link', '')
 
         if hasattr(entry,'content'):
         elif hasattr(entry,'description'):
             content = entry.description
         else:
-            continue
+            # Use title as fallback variant for the post's content
+            content = title
 
         summary = content[:summary_size]
 
             data_files.append(os.path.join(prefix, f))
 
 setup(
-    version = '0.1.11',
+    version = '0.1.12',
     description = 'Django application for atom/rss feeds aggregation i.e. planet engine',
     author = 'Grigoriy Petukhov',
     author_email = 'lorien@lorien.name',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.