Browse Source

pick last image from API list, not first

master
manetta 3 years ago
parent
commit
0e33df5f18
  1. 2
      command-line/update.py
  2. 2
      web-interface/update.py

2
command-line/update.py

@ -63,7 +63,7 @@ def download_media(html, images, wiki):
# we select the first search result
# (assuming that this is the image we are looking for)
image = data['query']['allimages'][0]
image = data['query']['allimages'][:1] # pick last item!!!
# then we download the image
image_url = image['url']

2
web-interface/update.py

@ -64,7 +64,7 @@ def download_media(html, images, wiki):
# we select the first search result
# (assuming that this is the image we are looking for)
image = data['query']['allimages'][0]
image = data['query']['allimages'][:1] # !!! pick last image
# then we download the image
image_url = image['url']

Loading…
Cancel
Save