correctly detect article key image

workspace
Brendan Howell 7 years ago
parent 9312ed8b0e
commit 05f1558e85

@ -228,7 +228,7 @@ class Publications(Bureau):
og_data = self._get_ogdata(entry.link) og_data = self._get_ogdata(entry.link)
if hasattr(entry, "media_thumbnail"): if hasattr(entry, "media_thumbnail"):
entry.img = entry.media_thumbnail[-1]["url"] entry.img = entry.media_thumbnail[-1]["url"]
elif hasattr(og_data, "image"): elif "image" in og_data:
entry.img = og_data["image"] entry.img = og_data["image"]
else: else:
entry.img = " " entry.img = " "

Loading…
Cancel
Save