Skip to content

Commit

Permalink
[realbooru] fix download URLs (#2530)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Nov 10, 2022
1 parent a4ff20c commit ecad02c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gallery_dl/extractor/gelbooru_v02.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def _prepare(post):

def _file_url_realbooru(self, post):
url = post["file_url"]
if url.count("/") == 5:
md5 = post["md5"]
md5 = post["md5"]
if md5 not in post["preview_url"] or url.count("/") == 5:
url = "{}/images/{}/{}/{}.{}".format(
self.root, md5[0:2], md5[2:4], md5, url.rpartition(".")[2])
return url
Expand Down

0 comments on commit ecad02c

Please sign in to comment.