1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-30 22:25:19 +00:00

[cleanup] Move embed tests to dedicated extractors (#13782)

Authored by: doe1080
This commit is contained in:
doe1080
2025-08-02 05:50:20 +09:00
committed by GitHub
parent 71f30921a2
commit 1c6068af99
59 changed files with 4770 additions and 5480 deletions

View File

@@ -8,17 +8,29 @@ from ..utils import (
class TVCIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?tvc\.ru/video/iframe/id/(?P<id>\d+)'
_EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>(?:http:)?//(?:www\.)?tvc\.ru/video/iframe/id/[^"]+)\1']
_TEST = {
_TESTS = [{
'url': 'http://www.tvc.ru/video/iframe/id/74622/isPlay/false/id_stat/channel/?acc_video_id=/channel/brand/id/17/show/episodes/episode_id/39702',
'md5': 'bbc5ff531d1e90e856f60fc4b3afd708',
'md5': 'aa6fb3cf384e18a0ad3b30ee2898beba',
'info_dict': {
'id': '74622',
'ext': 'mp4',
'title': 'События. "События". Эфир от 22.05.2015 14:30',
'thumbnail': r're:^https?://.*\.jpg$',
'title': 'TVC video #74622',
'duration': 1122,
'thumbnail': r're:https?://cdn\.tvc\.ru/pictures/.+\.jpg',
},
}
}]
_WEBPAGE_TESTS = [{
# FIXME: Embed detection
'url': 'https://krizis-centr.ru/informatsiya/smi-o-tsentre/liniya-zashchity-bitye-zhjony-tv-tsentr',
'md5': '43b8eee579a5cd2b85c9ed5b73d1c671',
'info_dict': {
'id': '123378',
'ext': 'mp4',
'title': 'TVC video #123378',
'duration': 1526,
'thumbnail': r're:https?://cdn\.tvc\.ru/pictures/.+\.jpg',
},
}]
def _real_extract(self, url):
video_id = self._match_id(url)