diff options
| author | 2021-08-13 17:45:31 -0400 | |
|---|---|---|
| committer | 2021-08-13 17:45:31 -0400 | |
| commit | d50ba9cfe80f00e02ca9a4714f75699c00e67128 (patch) | |
| tree | 01fe7b46370d5068b8c692ae5ea95cab4d734bd8 /gallery_dl/extractor/reactor.py | |
| parent | 873d9a628e9412a79bdc64cd962470749de3425b (diff) | |
New upstream version 1.18.3.upstream/1.18.3
Diffstat (limited to 'gallery_dl/extractor/reactor.py')
| -rw-r--r-- | gallery_dl/extractor/reactor.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gallery_dl/extractor/reactor.py b/gallery_dl/extractor/reactor.py index 104dc23..bbbdd3f 100644 --- a/gallery_dl/extractor/reactor.py +++ b/gallery_dl/extractor/reactor.py @@ -28,6 +28,7 @@ class ReactorExtractor(Extractor): Extractor.__init__(self, match) self.root = "http://" + match.group(1) self.session.headers["Referer"] = self.root + self.gif = self.config("gif", False) if not self.category: # set category based on domain name @@ -124,6 +125,12 @@ class ReactorExtractor(Extractor): elif "/post/webm/" not in url and "/post/mp4/" not in url: url = url.replace("/post/", "/post/full/") + if self.gif and ("/post/webm/" in url or "/post/mp4/" in url): + gif_url = text.extract(image, '<a href="', '"')[0] + if not gif_url: + continue + url = gif_url + yield { "url": url, "post_id": post_id, |
