diff options
| author | 2020-10-25 17:59:22 -0400 | |
|---|---|---|
| committer | 2020-10-25 17:59:22 -0400 | |
| commit | 5dc7d6f5902ddaee5223d041d5c10060f0c72430 (patch) | |
| tree | 6ddd103a86ea7bbb0d695f5fdfa55e43f04756ca /gallery_dl/extractor/gelbooru.py | |
| parent | e0c914765184ebbf99cffdecfe8cdbe10f42486e (diff) | |
New upstream version 1.15.2.upstream/1.15.2
Diffstat (limited to 'gallery_dl/extractor/gelbooru.py')
| -rw-r--r-- | gallery_dl/extractor/gelbooru.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gallery_dl/extractor/gelbooru.py b/gallery_dl/extractor/gelbooru.py index edadd31..c32ba5c 100644 --- a/gallery_dl/extractor/gelbooru.py +++ b/gallery_dl/extractor/gelbooru.py @@ -33,6 +33,15 @@ class GelbooruExtractor(booru.XmlParserMixin, self.session.cookies["fringeBenefits"] = "yup" self.per_page = 42 + @staticmethod + def get_file_url(image): + url = image["file_url"] + if url.startswith("https://mp4.gelbooru.com/"): + ihash = image["md5"] + return "https://img2.gelbooru.com/images/{}/{}/{}.webm".format( + ihash[0:2], ihash[2:4], ihash) + return url + def items_noapi(self): yield Message.Version, 1 data = self.get_metadata() |
