fix cookie checks for patreon, fanbox, fantia
The changes in 9a255344 caused a warning about missing cookies to be
displayed even if those cookies were present, because _check_cookies()
did not account for an empty cookiedomain.
This commit is contained in:
@@ -336,7 +336,8 @@ class Extractor():
|
||||
now = time.time()
|
||||
|
||||
for cookie in self._cookiejar:
|
||||
if cookie.name in names and cookie.domain == domain:
|
||||
if cookie.name in names and (
|
||||
not domain or cookie.domain == domain):
|
||||
if cookie.expires and cookie.expires < now:
|
||||
self.log.warning("Cookie '%s' has expired", cookie.name)
|
||||
else:
|
||||
|
||||
@@ -20,6 +20,7 @@ class PatreonExtractor(Extractor):
|
||||
"""Base class for patreon extractors"""
|
||||
category = "patreon"
|
||||
root = "https://www.patreon.com"
|
||||
cookiedomain = ".patreon.com"
|
||||
directory_fmt = ("{category}", "{creator[full_name]}")
|
||||
filename_fmt = "{id}_{title}_{num:>02}.{extension}"
|
||||
archive_fmt = "{id}_{num}"
|
||||
|
||||
Reference in New Issue
Block a user