summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/reactor.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/reactor.py')
-rw-r--r--gallery_dl/extractor/reactor.py7
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,