1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-01 07:05:14 +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

@@ -76,6 +76,7 @@ class ViewLiftEmbedIE(ViewLiftBaseIE):
'timestamp': 1334350096,
'upload_date': '20120413',
},
'skip': 'Invalid URL',
}, {
# invalid labels, 360p is better that 480p
'url': 'http://www.snagfilms.com/embed/player?filmId=17ca0950-a74a-11e0-a92a-0026bb61d036',
@@ -90,6 +91,15 @@ class ViewLiftEmbedIE(ViewLiftBaseIE):
'url': 'http://www.snagfilms.com/embed/player?filmId=0000014c-de2f-d5d6-abcf-ffef58af0017',
'only_matching': True,
}]
_WEBPAGE_TESTS = [{
'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
'info_dict': {
'id': '74849a00-85a9-11e1-9660-123139220831',
'ext': 'mp4',
'title': '#whilewewatch',
},
'skip': 'Dead embed URL',
}]
def _real_extract(self, url):
domain, film_id = self._match_valid_url(url).groups()
@@ -164,13 +174,14 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'Lost for Life',
'description': 'md5:ea10b5a50405ae1f7b5269a6ec594102',
'thumbnail': r're:^https?://.*\.jpg',
'thumbnail': r're:https?://.+\.jpg',
'duration': 4489,
'categories': 'mincount:3',
'age_limit': 14,
'upload_date': '20150421',
'timestamp': 1429656820,
},
'skip': 'Invalid URL',
}, {
'url': 'http://www.snagfilms.com/show/the_world_cut_project/india',
'md5': 'e6292e5b837642bbda82d7f8bf3fbdfd',
@@ -180,11 +191,12 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'India',
'description': 'md5:5c168c5a8f4719c146aad2e0dfac6f5f',
'thumbnail': r're:^https?://.*\.jpg',
'thumbnail': r're:https?://.+\.jpg',
'duration': 979,
'timestamp': 1399478279,
'upload_date': '20140507',
},
'skip': 'Invalid URL',
}, {
'url': 'http://main.snagfilms.com/augie_alone/s_2_ep_12_love',
'info_dict': {
@@ -193,15 +205,13 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'S. 2 Ep. 12 - Love',
'description': 'Augie finds love.',
'thumbnail': r're:^https?://.*\.jpg',
'thumbnail': r're:https?://.+\.jpg',
'duration': 107,
'upload_date': '20141012',
'timestamp': 1413129540,
'age_limit': 17,
},
'params': {
'skip_download': True,
},
'skip': 'Invalid URL',
}, {
'url': 'http://main.snagfilms.com/films/title/the_freebie',
'only_matching': True,
@@ -230,10 +240,10 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'Shuyopoka',
'description': 'md5:e28f2fb8680096a69c944d37c1fa5ffc',
'thumbnail': r're:^https?://.*\.jpg$',
'thumbnail': r're:https?://.+\.jpg',
'upload_date': '20211006',
},
'params': {'skip_download': True},
'skip': 'Subscription required',
}, { # Free film
'url': 'https://www.hoichoi.tv/films/title/dadu-no1',
'info_dict': {
@@ -241,10 +251,10 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'Dadu No.1',
'description': 'md5:605cba408e51a79dafcb824bdeded51e',
'thumbnail': r're:^https?://.*\.jpg$',
'thumbnail': r're:https?://.+\.jpg',
'upload_date': '20210827',
},
'params': {'skip_download': True},
'skip': 'Subscription required',
}, { # Free episode
'url': 'https://www.hoichoi.tv/webseries/case-jaundice-s01-e01',
'info_dict': {
@@ -252,11 +262,11 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'Humans Vs. Corona',
'description': 'md5:ca30a682b4528d02a3eb6d0427dd0f87',
'thumbnail': r're:^https?://.*\.jpg$',
'thumbnail': r're:https?://.+\.jpg',
'upload_date': '20210830',
'series': 'Case Jaundice',
},
'params': {'skip_download': True},
'skip': 'Invalid URL',
}, { # Free video
'url': 'https://www.hoichoi.tv/videos/1549072415320-six-episode-02-hindi',
'info_dict': {
@@ -264,11 +274,11 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'Woman in red - Hindi',
'description': 'md5:9d21edc1827d32f8633eb67c2054fc31',
'thumbnail': r're:^https?://.*\.jpg$',
'thumbnail': r're:https?://.+\.jpg',
'upload_date': '20211006',
'series': 'Six (Hindi)',
},
'params': {'skip_download': True},
'skip': 'Invalid URL',
}, { # Free episode
'url': 'https://www.hoichoi.tv/shows/watch-asian-paints-moner-thikana-online-season-1-episode-1',
'info_dict': {
@@ -276,23 +286,25 @@ class ViewLiftIE(ViewLiftBaseIE):
'ext': 'mp4',
'title': 'Jisshu Sengupta',
'description': 'md5:ef6ffae01a3d83438597367400f824ed',
'thumbnail': r're:^https?://.*\.jpg$',
'thumbnail': r're:https?://.+\.jpg',
'upload_date': '20211004',
'series': 'Asian Paints Moner Thikana',
},
'params': {'skip_download': True},
'skip': 'Invalid URL',
}, { # Free series
'url': 'https://www.hoichoi.tv/shows/watch-moner-thikana-bengali-web-series-online',
'playlist_mincount': 5,
'info_dict': {
'id': 'watch-moner-thikana-bengali-web-series-online',
},
'skip': 'Subscription required',
}, { # Premium series
'url': 'https://www.hoichoi.tv/shows/watch-byomkesh-bengali-web-series-online',
'playlist_mincount': 14,
'info_dict': {
'id': 'watch-byomkesh-bengali-web-series-online',
},
'skip': 'Subscription required',
}, { # Premium movie
'url': 'https://www.hoichoi.tv/movies/detective-2020',
'only_matching': True,
@@ -302,6 +314,7 @@ class ViewLiftIE(ViewLiftBaseIE):
'info_dict': {
'id': 'bn/series/sinpaat',
},
'skip': 'Subscription required',
}, { # Chorki free movie
'url': 'https://www.chorki.com/bn/videos/bangla-movie-bikkhov',
'info_dict': {
@@ -317,9 +330,7 @@ class ViewLiftIE(ViewLiftBaseIE):
'description': 'md5:71492b086450625f4374a3eb824f27dc',
'duration': 8002,
},
'params': {
'skip_download': True,
},
'skip': 'Invalid URL',
}, { # Chorki Premium movie
'url': 'https://www.chorki.com/bn/videos/something-like-an-autobiography',
'only_matching': True,