From 896896a4902a6c1cc591492681adaea7d03d9eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 25 Dec 2019 17:28:55 +0100 Subject: [PATCH] [twitter] fix URLs forwarded to youtube-dl (closes #540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit 3bba763 data["user"] is an entire dict object and no longer just the user nickname … --- gallery_dl/extractor/twitter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index 8ef966f2..5c41f99c 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -53,8 +53,8 @@ class TwitterExtractor(Extractor): if self.videos == "ytdl": data["extension"] = None - url = "ytdl:{}/{}/status/{}".format( - self.root, data["user"], data["tweet_id"]) + url = "ytdl:{}/i/web/status/{}".format( + self.root, data["tweet_id"]) else: url = self._video_from_tweet(data["tweet_id"]) ext = text.ext_from_url(url) @@ -313,7 +313,7 @@ class TwitterTweetExtractor(TwitterExtractor): # Reply to another tweet (#403) ("https://twitter.com/tyson_hesse/status/1103767554424598528", { "options": (("videos", "ytdl"),), - "pattern": r"ytdl:https://twitter.com/.+/1103767554424598528", + "pattern": r"ytdl:https://twitter.com/i/web.+/1103767554424598528", }), # /i/web/ URL ("https://twitter.com/i/web/status/1155074198240292865", {