Compare commits

...

5 Commits

Author SHA1 Message Date
sepro
3eace2a844 Update additional test cases 2023-12-05 23:42:18 +01:00
Benjamin Krausse
594f5cc1ea Merge branch 'theplatform' of https://github.com/trainman261/yt-dlp into theplatform
# Conflicts:
#	yt_dlp/extractor/cbc.py
#	yt_dlp/extractor/mediaset.py
#	yt_dlp/extractor/nbc.py
2023-12-05 23:15:33 +01:00
trainman261
80ef292b8a
Update yt_dlp/extractor/theplatform.py
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
2023-12-05 23:07:31 +01:00
Benjamin Krausse
bdb392092d Merge branch 'theplatform' of https://github.com/trainman261/yt-dlp into theplatform
# Conflicts:
#	yt_dlp/extractor/mediaset.py
2023-12-05 19:56:43 +01:00
Benjamin Krausse
dd04d0afbe Modifying tests according to @seproDev 2023-12-05 08:38:18 +01:00
4 changed files with 27 additions and 4 deletions

View File

@ -121,11 +121,21 @@ class AENetworksIE(AENetworksBaseIE):
'info_dict': {
'id': '22253814',
'ext': 'mp4',
'title': 'Winter is Coming',
'description': 'md5:641f424b7a19d8e24f26dea22cf59d74',
'title': 'Winter Is Coming',
'description': 'md5:a40e370925074260b1c8a633c632c63a',
'timestamp': 1338306241,
'upload_date': '20120529',
'uploader': 'AENE-NEW',
'duration': 2592.0,
'thumbnail': r're:^https?://.*\.jpe?g$',
'chapters': 'count:5',
'tags': 'count:14',
'categories': ['Mountain Men'],
'episode_number': 1,
'episode': 'Episode 1',
'season': 'Season 1',
'season_number': 1,
'series': 'Mountain Men',
},
'params': {
# m3u8 download
@ -143,6 +153,15 @@ class AENetworksIE(AENetworksBaseIE):
'timestamp': 1452634428,
'upload_date': '20160112',
'uploader': 'AENE-NEW',
'duration': 1277.695,
'thumbnail': r're:^https?://.*\.jpe?g$',
'chapters': 'count:4',
'tags': 'count:23',
'episode': 'Episode 1',
'episode_number': 1,
'season': 'Season 9',
'season_number': 9,
'series': 'Duck Dynasty',
},
'params': {
# m3u8 download

View File

@ -205,7 +205,7 @@ class CBCPlayerIE(InfoExtractor):
'series': 'CBC News: Windsor at 6:00',
'categories': ['News/Canada/Windsor'],
'location': 'Windsor',
'tags': ['cancer'],
'tags': 'count:1',
'creator': 'Allison Johnson',
'media_type': 'Excerpt',
},

View File

@ -46,6 +46,10 @@ class CWTVIE(InfoExtractor):
'timestamp': 1444107300,
'age_limit': 14,
'uploader': 'CWTV',
'thumbnail': r're:^https?://.*\.jpe?g$',
'chapters': 'count:4',
'episode': 'Episode 20',
'season': 'Season 11',
},
'params': {
# m3u8 download

View File

@ -106,7 +106,7 @@ class ThePlatformBaseIE(OnceIE):
def extract_site_specific_field(field):
# A number of sites have custom-prefixed keys, e.g. 'cbc$seasonNumber'
return next((info[k] for k in info if k.endswith(f'${field}') and info[k] != ''), None)
return traverse_obj(info, lambda k, v: v and k.endswith(f'${field}'), get_all=False)
return {
'title': info['title'],