[weibo] fix 'livephoto' filename extensions (#5287)
This commit is contained in:
@@ -118,7 +118,7 @@ class WeiboExtractor(Extractor):
|
|||||||
append(pic["largest"].copy())
|
append(pic["largest"].copy())
|
||||||
|
|
||||||
file = {"url": pic["video"]}
|
file = {"url": pic["video"]}
|
||||||
file["filehame"], _, file["extension"] = \
|
file["filename"], _, file["extension"] = \
|
||||||
pic["video"].rpartition("%2F")[2].rpartition(".")
|
pic["video"].rpartition("%2F")[2].rpartition(".")
|
||||||
append(file)
|
append(file)
|
||||||
|
|
||||||
|
|||||||
@@ -209,8 +209,10 @@ __tests__ = (
|
|||||||
"#comment" : "type == livephoto (#2146)",
|
"#comment" : "type == livephoto (#2146)",
|
||||||
"#category": ("", "weibo", "status"),
|
"#category": ("", "weibo", "status"),
|
||||||
"#class" : weibo.WeiboStatusExtractor,
|
"#class" : weibo.WeiboStatusExtractor,
|
||||||
"#pattern" : r"https://video\.weibo\.com/media/play\?livephoto=https%3A%2F%2Fus.sinaimg.cn%2F\w+\.mov",
|
"#pattern" : r"https://video\.weibo\.com/media/play\?livephoto=https%3A%2F%2Fus\.sinaimg\.cn%2F\w+\.mov",
|
||||||
"#range" : "2,4,6",
|
"#range" : "2,4,6",
|
||||||
|
|
||||||
|
"extension": "mov",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -219,6 +221,8 @@ __tests__ = (
|
|||||||
"#category": ("", "weibo", "status"),
|
"#category": ("", "weibo", "status"),
|
||||||
"#class" : weibo.WeiboStatusExtractor,
|
"#class" : weibo.WeiboStatusExtractor,
|
||||||
"#urls" : "https://wx4.sinaimg.cn/large/68d80d22gy1h2ryfa8k0kg208w06o7wh.gif",
|
"#urls" : "https://wx4.sinaimg.cn/large/68d80d22gy1h2ryfa8k0kg208w06o7wh.gif",
|
||||||
|
|
||||||
|
"extension": "gif",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user