Skip to content

Commit

Permalink
[twitter] fix URLs forwarded to youtube-dl (closes #540)
Browse files Browse the repository at this point in the history
Since commit 3bba763 data["user"] is an entire dict object
and no longer just the user nickname …
  • Loading branch information
mikf committed Dec 25, 2019
1 parent 1e2713b commit 896896a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gallery_dl/extractor/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def items(self):

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)
Expand Down Expand Up @@ -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", {
Expand Down

0 comments on commit 896896a

Please sign in to comment.