summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/arcalive.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/arcalive.py')
-rw-r--r--gallery_dl/extractor/arcalive.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/gallery_dl/extractor/arcalive.py b/gallery_dl/extractor/arcalive.py
index 8e832fe..8c44256 100644
--- a/gallery_dl/extractor/arcalive.py
+++ b/gallery_dl/extractor/arcalive.py
@@ -41,7 +41,9 @@ class ArcalivePostExtractor(ArcaliveExtractor):
def items(self):
self.emoticons = self.config("emoticons", False)
- self.gifs = self.config("gifs", True)
+ self.gifs = gifs = self.config("gifs", True)
+ if gifs:
+ self.gifs_fallback = (gifs != "check")
post = self.api.post(self.groups[0])
files = self._extract_files(post)
@@ -90,11 +92,15 @@ class ArcalivePostExtractor(ArcaliveExtractor):
url = path + "." + orig
elif video and self.gifs:
url_gif = url.rpartition(".")[0] + ".gif"
- response = self.request(
- url_gif + "?type=orig", method="HEAD", fatal=False)
- if response.status_code < 400:
+ if self.gifs_fallback:
fallback = (url + "?type=orig",)
url = url_gif
+ else:
+ response = self.request(
+ url_gif + "?type=orig", method="HEAD", fatal=False)
+ if response.status_code < 400:
+ fallback = (url + "?type=orig",)
+ url = url_gif
files.append({
"url" : url + "?type=orig",