1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 06:35:12 +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:
pukkandan
2021-06-06 15:05:07 +05:30
parent e85a39717a
commit d3d8d8184a
4 changed files with 6 additions and 6 deletions

View File

@@ -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