mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Error handling when no videos in feed.
This commit is contained in:
parent
b9d876c4c9
commit
fcaae3a162
1 changed files with 11 additions and 10 deletions
|
@ -49,16 +49,17 @@ class FacebookFetcher:
|
||||||
merged_data.append(story_data)
|
merged_data.append(story_data)
|
||||||
|
|
||||||
videos = feed.get('videos', {}).get('data', None)
|
videos = feed.get('videos', {}).get('data', None)
|
||||||
for video in videos:
|
if videos:
|
||||||
story_data = self.page_video_story(facebook_user, video)
|
for video in videos:
|
||||||
if not story_data:
|
story_data = self.page_video_story(facebook_user, video)
|
||||||
continue
|
if not story_data:
|
||||||
for seen_data in merged_data:
|
continue
|
||||||
if story_data['link'] == seen_data['link']:
|
for seen_data in merged_data:
|
||||||
# Video wins over posts (and attachments)
|
if story_data['link'] == seen_data['link']:
|
||||||
seen_data['description'] = story_data['description']
|
# Video wins over posts (and attachments)
|
||||||
seen_data['title'] = story_data['title']
|
seen_data['description'] = story_data['description']
|
||||||
break
|
seen_data['title'] = story_data['title']
|
||||||
|
break
|
||||||
|
|
||||||
for story_data in merged_data:
|
for story_data in merged_data:
|
||||||
rss.add_item(**story_data)
|
rss.add_item(**story_data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue