summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/fantia.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-07-15 17:08:47 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-07-15 17:08:47 -0400
commite2f67519f8c1750a71aab3dc56b8345fff21bac5 (patch)
tree26770e9b79821f2fa10ed3b07a4669f857db8071 /gallery_dl/extractor/fantia.py
parentef30b1fa552fd4ceebdd14bbcc16f30f430883f8 (diff)
New upstream version 1.25.8.upstream/1.25.8
Diffstat (limited to 'gallery_dl/extractor/fantia.py')
-rw-r--r--gallery_dl/extractor/fantia.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gallery_dl/extractor/fantia.py b/gallery_dl/extractor/fantia.py
index 35c4cc4..f92b904 100644
--- a/gallery_dl/extractor/fantia.py
+++ b/gallery_dl/extractor/fantia.py
@@ -23,6 +23,7 @@ class FantiaExtractor(Extractor):
self.headers = {
"Accept" : "application/json, text/plain, */*",
"Referer": self.root,
+ "X-Requested-With": "XMLHttpRequest",
}
_empty_plan = {
"id" : 0,
@@ -68,7 +69,8 @@ class FantiaExtractor(Extractor):
def _pagination(self, url):
params = {"page": 1}
- headers = self.headers
+ headers = self.headers.copy()
+ del headers["X-Requested-With"]
while True:
page = self.request(url, params=params, headers=headers).text