[twitter] fix URLs forwarded to youtube-dl (closes #540)
Since commit 3bba763 data["user"] is an entire dict object
and no longer just the user nickname …
This commit is contained in:
@@ -53,8 +53,8 @@ class TwitterExtractor(Extractor):
|
|||||||
|
|
||||||
if self.videos == "ytdl":
|
if self.videos == "ytdl":
|
||||||
data["extension"] = None
|
data["extension"] = None
|
||||||
url = "ytdl:{}/{}/status/{}".format(
|
url = "ytdl:{}/i/web/status/{}".format(
|
||||||
self.root, data["user"], data["tweet_id"])
|
self.root, data["tweet_id"])
|
||||||
else:
|
else:
|
||||||
url = self._video_from_tweet(data["tweet_id"])
|
url = self._video_from_tweet(data["tweet_id"])
|
||||||
ext = text.ext_from_url(url)
|
ext = text.ext_from_url(url)
|
||||||
@@ -313,7 +313,7 @@ class TwitterTweetExtractor(TwitterExtractor):
|
|||||||
# Reply to another tweet (#403)
|
# Reply to another tweet (#403)
|
||||||
("https://twitter.com/tyson_hesse/status/1103767554424598528", {
|
("https://twitter.com/tyson_hesse/status/1103767554424598528", {
|
||||||
"options": (("videos", "ytdl"),),
|
"options": (("videos", "ytdl"),),
|
||||||
"pattern": r"ytdl:https://twitter.com/.+/1103767554424598528",
|
"pattern": r"ytdl:https://twitter.com/i/web.+/1103767554424598528",
|
||||||
}),
|
}),
|
||||||
# /i/web/ URL
|
# /i/web/ URL
|
||||||
("https://twitter.com/i/web/status/1155074198240292865", {
|
("https://twitter.com/i/web/status/1155074198240292865", {
|
||||||
|
|||||||
Reference in New Issue
Block a user