aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author4ft35t <4ft35t@users.noreply.github.com>2025-01-19 21:10:36 +0800
committerGitHub <noreply@github.com>2025-01-19 14:10:36 +0100
commita567f97b62ae9f6d6f5a9376c361512ab8dceda2 (patch)
tree1d85605edc508fbd2017395636473e41906e8087
parent164368610456e2d96b279f8b120dea08f7b1d74f (diff)
[ie/Weibo] Extend `_VALID_URL` (#12088)
Closes #12086 Authored by: 4ft35t
-rw-r--r--yt_dlp/extractor/weibo.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/yt_dlp/extractor/weibo.py b/yt_dlp/extractor/weibo.py
index e632858e5..6e57446e9 100644
--- a/yt_dlp/extractor/weibo.py
+++ b/yt_dlp/extractor/weibo.py
@@ -124,7 +124,7 @@ class WeiboBaseIE(InfoExtractor):
class WeiboIE(WeiboBaseIE):
- _VALID_URL = r'https?://(?:m\.weibo\.cn/status|(?:www\.)?weibo\.com/\d+)/(?P<id>[a-zA-Z0-9]+)'
+ _VALID_URL = r'https?://(?:m\.weibo\.cn/(?:status|detail)|(?:www\.)?weibo\.com/\d+)/(?P<id>[a-zA-Z0-9]+)'
_TESTS = [{
'url': 'https://weibo.com/7827771738/N4xlMvjhI',
'info_dict': {
@@ -165,6 +165,25 @@ class WeiboIE(WeiboBaseIE):
'repost_count': int,
},
}, {
+ 'url': 'https://m.weibo.cn/detail/4189191225395228',
+ 'info_dict': {
+ 'id': '4189191225395228',
+ 'ext': 'mp4',
+ 'display_id': 'FBqgOmDxO',
+ 'title': '柴犬柴犬的秒拍视频',
+ 'description': '午睡当然是要甜甜蜜蜜的啦![坏笑] Instagram:shibainu.gaku http://t.cn/RHbmjzW ',
+ 'duration': 53,
+ 'timestamp': 1514264429,
+ 'upload_date': '20171226',
+ 'thumbnail': r're:https://.*\.jpg',
+ 'uploader': '柴犬柴犬',
+ 'uploader_id': '5926682210',
+ 'uploader_url': 'https://weibo.com/u/5926682210',
+ 'view_count': int,
+ 'like_count': int,
+ 'repost_count': int,
+ },
+ }, {
'url': 'https://weibo.com/0/4224132150961381',
'note': 'no playback_list example',
'only_matching': True,