diff options
| author | 2020-12-30 18:41:48 -0500 | |
|---|---|---|
| committer | 2020-12-30 18:41:48 -0500 | |
| commit | 87a5aa088ce33a1196ff409b76a9ea8233bdc634 (patch) | |
| tree | 7e6155edcc5dd12e40b47ad814b3bc69e65c52fc /gallery_dl/extractor/gelbooru.py | |
| parent | 8f7c87a2697113134c311aaeafd9c919555a2741 (diff) | |
New upstream version 1.16.1.upstream/1.16.1
Diffstat (limited to 'gallery_dl/extractor/gelbooru.py')
| -rw-r--r-- | gallery_dl/extractor/gelbooru.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gallery_dl/extractor/gelbooru.py b/gallery_dl/extractor/gelbooru.py index b0614e2..7a28e9c 100644 --- a/gallery_dl/extractor/gelbooru.py +++ b/gallery_dl/extractor/gelbooru.py @@ -17,11 +17,12 @@ class GelbooruBase(): category = "gelbooru" root = "https://gelbooru.com" - def _prepare_post(self, post, extended_tags=False): - url = booru.BooruExtractor._prepare_post(self, post, extended_tags) - if url.startswith("https://mp4.gelbooru.com/"): + @staticmethod + def _file_url(post): + url = post["file_url"] + if url.startswith(("https://mp4.gelbooru.com/", "https://video-cdn")): md5 = post["md5"] - return "https://img2.gelbooru.com/images/{}/{}/{}.webm".format( + url = "https://img2.gelbooru.com/images/{}/{}/{}.webm".format( md5[0:2], md5[2:4], md5) return url |
