Using JSON feed external url if available.

This commit is contained in:
Samuel Clay 2017-05-23 23:12:10 -07:00
parent a1176588d8
commit 8d14dcf008

View file

@ -45,7 +45,7 @@ class JSONFetcher:
date_published = dateutil.parser.parse(pubdate)
story = {
'title': item.get('title', None),
'link': item.get('url', None),
'link': item.get('external_url', item.get('url', None)),
'description': item.get('content_html', item.get('content_text', None)),
'author_name': item.get('author', {}).get('name', None),
'categories': item.get('tags', []),