mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-15 12:45:27 +00:00
[extractor] Fix pre-checking archive for some extractors
The `id` regex group must be present for `_match_id` and pre-checking archive to work correctly
This commit is contained in:
@@ -18,7 +18,7 @@ from ..utils import (
|
||||
class SinaIE(InfoExtractor):
|
||||
_VALID_URL = r'''(?x)https?://(?:.*?\.)?video\.sina\.com\.cn/
|
||||
(?:
|
||||
(?:view/|.*\#)(?P<video_id>\d+)|
|
||||
(?:view/|.*\#)(?P<id>\d+)|
|
||||
.+?/(?P<pseudo_id>[^/?#]+)(?:\.s?html)|
|
||||
# This is used by external sites like Weibo
|
||||
api/sinawebApi/outplay.php/(?P<token>.+?)\.swf
|
||||
@@ -58,7 +58,7 @@ class SinaIE(InfoExtractor):
|
||||
def _real_extract(self, url):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
|
||||
video_id = mobj.group('video_id')
|
||||
video_id = mobj.group('id')
|
||||
if not video_id:
|
||||
if mobj.group('token') is not None:
|
||||
# The video id is in the redirected url
|
||||
|
||||
Reference in New Issue
Block a user