1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[nitter] set 'hlsPlayback' cookie

This commit is contained in:
Mike Fährmann 2022-11-25 00:45:32 +01:00
parent e081b1fac4
commit ed49e63d95
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -20,12 +20,16 @@ class NitterExtractor(BaseExtractor):
archive_fmt = "{tweet_id}_{num}"
def __init__(self, match):
self.cookiedomain = self.root.partition("://")[2]
BaseExtractor.__init__(self, match)
self.user = match.group(match.lastindex)
def items(self):
videos = self.config("videos", True)
ytdl = (videos == "ytdl")
if videos:
ytdl = (videos == "ytdl")
videos = True
self._cookiejar.set("hlsPlayback", "on", domain=self.cookiedomain)
for tweet_html in self.tweets():
tweet = self._tweet_from_html(tweet_html)