consistent cookie-related names

- rename every cookie variable or method to 'cookies_*'
- simplify '.session.cookies' to just '.cookies'
- more consistent 'login()' structure
This commit is contained in:
Mike Fährmann
2023-07-21 22:38:39 +02:00
parent ceebacc9e1
commit d97b8c2fba
50 changed files with 278 additions and 261 deletions

View File

@@ -21,7 +21,7 @@ class NitterExtractor(BaseExtractor):
archive_fmt = "{tweet_id}_{num}"
def __init__(self, match):
self.cookiedomain = self.root.partition("://")[2]
self.cookies_domain = self.root.partition("://")[2]
BaseExtractor.__init__(self, match)
lastindex = match.lastindex
@@ -35,7 +35,7 @@ class NitterExtractor(BaseExtractor):
if videos:
ytdl = (videos == "ytdl")
videos = True
self._cookiejar.set("hlsPlayback", "on", domain=self.cookiedomain)
self.cookies.set("hlsPlayback", "on", domain=self.cookies_domain)
for tweet in self.tweets():