Skip to content

Commit

Permalink
Fixes the file url in the download example. (#39)
Browse files Browse the repository at this point in the history
Danbooru's API already includes the host in 'file_url'. This removes the duplicated host at the beginning.
  • Loading branch information
Luk3 authored and LuqueDaniel committed Jul 15, 2018
1 parent 81363fa commit 0425a3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/danbooru/download_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def download(tags, pages):
posts = client.post_list(tags=tags, page=randompage, limit=200)
for post in posts:
try:
fileurl = 'https://danbooru.donmai.us' + post['file_url']
fileurl = post['file_url']
except:
fileurl = 'https://danbooru.donmai.us' + post['source']
x.append(fileurl)
Expand Down

0 comments on commit 0425a3b

Please sign in to comment.