We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8816b21 commit 5137f42Copy full SHA for 5137f42
download_feeds.py
@@ -147,21 +147,22 @@ def get_news(entry, media_link=False):
147
"""
148
149
media_type = 'text/html'
150
- entry_link = entry.link
151
152
if media_link:
153
media_types = ['audio', 'video']
154
else:
155
media_types = ['text']
156
157
- links = entry.get('links', entry.link)
+ entry_link = entry.get('link', '')
+
158
+ links = entry.get('links', entry_link)
159
160
if hasattr(entry, 'published_parsed'):
161
entry_published = str(calendar.timegm(entry.published_parsed))
162
163
entry_published = 0
164
- if links != entry.link:
165
+ if links != entry_link:
166
matching = [link for link in links if link.type.split(
167
'/')[0] in media_types]
168
if matching:
0 commit comments