mirror of
https://github.com/Findus23/acronomy.git
synced 2024-09-19 15:33:45 +02:00
don't add images without attribution key
This commit is contained in:
parent
30b1467077
commit
16145e1c9c
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ class WikipediaImageAPIObject:
|
|||
r.raise_for_status()
|
||||
self.data = r.json()
|
||||
self.image_obj = list(self.data["query"]["pages"].values())[0]
|
||||
if "imageinfo" not in self.image_obj:
|
||||
if "imageinfo" not in self.image_obj or "AttributionRequired" not in self.extmetadata:
|
||||
raise NotFoundError()
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue