mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 19:51:34 +01:00
replace static 'sleep-request' defaults with dynamic ones
This commit is contained in:
parent
b127321b5c
commit
1f9b16a70b
@ -20,7 +20,7 @@ class DanbooruExtractor(BaseExtractor):
|
||||
page_limit = 1000
|
||||
page_start = None
|
||||
per_page = 200
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
|
||||
def _init(self):
|
||||
self.ugoira = self.config("ugoira", False)
|
||||
|
@ -26,7 +26,7 @@ class ExhentaiExtractor(Extractor):
|
||||
cookies_domain = ".exhentai.org"
|
||||
cookies_names = ("ipb_member_id", "ipb_pass_hash")
|
||||
root = "https://exhentai.org"
|
||||
request_interval = 5.0
|
||||
request_interval = (3.0, 6.0)
|
||||
ciphers = "DEFAULT:!DH"
|
||||
|
||||
LIMIT = False
|
||||
|
@ -169,7 +169,7 @@ class FoolfuukaSearchExtractor(FoolfuukaExtractor):
|
||||
directory_fmt = ("{category}", "search", "{search}")
|
||||
pattern = BASE_PATTERN + r"/([^/?#]+)/search((?:/[^/?#]+/[^/?#]+)+)"
|
||||
example = "https://archived.moe/_/search/text/QUERY/"
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
|
||||
def __init__(self, match):
|
||||
FoolfuukaExtractor.__init__(self, match)
|
||||
|
@ -25,7 +25,7 @@ class IdolcomplexExtractor(SankakuExtractor):
|
||||
cookies_domain = "idol.sankakucomplex.com"
|
||||
cookies_names = ("_idolcomplex_session",)
|
||||
referer = False
|
||||
request_interval = (4.0, 6.0)
|
||||
request_interval = (3.0, 6.0)
|
||||
|
||||
def __init__(self, match):
|
||||
SankakuExtractor.__init__(self, match)
|
||||
|
@ -23,7 +23,7 @@ class NewgroundsExtractor(Extractor):
|
||||
root = "https://www.newgrounds.com"
|
||||
cookies_domain = ".newgrounds.com"
|
||||
cookies_names = ("NG_GG_username", "vmk1du5I8m")
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
|
||||
def __init__(self, match):
|
||||
Extractor.__init__(self, match)
|
||||
|
@ -18,7 +18,7 @@ class PhilomenaExtractor(BooruExtractor):
|
||||
basecategory = "philomena"
|
||||
filename_fmt = "{filename}.{extension}"
|
||||
archive_fmt = "{id}"
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
page_start = 1
|
||||
per_page = 50
|
||||
|
||||
|
@ -594,7 +594,7 @@ class PixivSeriesExtractor(PixivExtractor):
|
||||
class PixivNovelExtractor(PixivExtractor):
|
||||
"""Extractor for pixiv novels"""
|
||||
subcategory = "novel"
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
pattern = BASE_PATTERN + r"/n(?:ovel/show\.php\?id=|/)(\d+)"
|
||||
example = "https://www.pixiv.net/novel/show.php?id=12345"
|
||||
|
||||
|
@ -18,7 +18,7 @@ class PlurkExtractor(Extractor):
|
||||
"""Base class for plurk extractors"""
|
||||
category = "plurk"
|
||||
root = "https://www.plurk.com"
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
|
||||
def items(self):
|
||||
urls = self._urls_ex if self.config("comments", False) else self._urls
|
||||
|
@ -18,7 +18,7 @@ class ReactorExtractor(BaseExtractor):
|
||||
basecategory = "reactor"
|
||||
filename_fmt = "{post_id}_{num:>02}{title[:100]:?_//}.{extension}"
|
||||
archive_fmt = "{post_id}_{num}"
|
||||
request_interval = 5.0
|
||||
request_interval = (3.0, 6.0)
|
||||
|
||||
def __init__(self, match):
|
||||
BaseExtractor.__init__(self, match)
|
||||
|
@ -23,7 +23,7 @@ class ReadcomiconlineBase():
|
||||
filename_fmt = "{comic}_{issue:>03}_{page:>03}.{extension}"
|
||||
archive_fmt = "{issue_id}_{page}"
|
||||
root = "https://readcomiconline.li"
|
||||
request_interval = (3.0, 7.0)
|
||||
request_interval = (3.0, 6.0)
|
||||
|
||||
def request(self, url, **kwargs):
|
||||
"""Detect and handle redirects to CAPTCHA pages"""
|
||||
|
@ -22,7 +22,7 @@ class TwibooruExtractor(BooruExtractor):
|
||||
root = "https://twibooru.org"
|
||||
filename_fmt = "{id}_{filename}.{extension}"
|
||||
archive_fmt = "{id}"
|
||||
request_interval = 6.05
|
||||
request_interval = (6.0, 6.1)
|
||||
page_start = 1
|
||||
per_page = 50
|
||||
|
||||
@ -44,7 +44,7 @@ class TwibooruExtractor(BooruExtractor):
|
||||
class TwibooruPostExtractor(TwibooruExtractor):
|
||||
"""Extractor for single twibooru posts"""
|
||||
subcategory = "post"
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
pattern = BASE_PATTERN + r"/(\d+)"
|
||||
example = "https://twibooru.org/12345"
|
||||
|
||||
|
@ -21,7 +21,7 @@ class VkExtractor(Extractor):
|
||||
filename_fmt = "{id}.{extension}"
|
||||
archive_fmt = "{id}"
|
||||
root = "https://vk.com"
|
||||
request_interval = 1.0
|
||||
request_interval = (0.5, 1.5)
|
||||
|
||||
def items(self):
|
||||
sizes = "wzyxrqpo"
|
||||
|
Loading…
x
Reference in New Issue
Block a user