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:
Mike Fährmann
2022-01-01 03:52:01 +01:00
parent 1e0278702d
commit 6f2e0c9c3d
2 changed files with 3 additions and 1 deletions

View File

@@ -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: