Compare commits

..

5 Commits

Author SHA1 Message Date
trainman261
a02438274d
Update yt_dlp/extractor/cbc.py
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-12-05 08:35:21 +01:00
trainman261
23ac431a48
Update yt_dlp/extractor/theplatform.py
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-12-05 08:33:37 +01:00
trainman261
c5224ff490
Update yt_dlp/extractor/theplatform.py
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-12-05 08:33:23 +01:00
trainman261
b3cd2341dc
Update yt_dlp/extractor/mediaset.py
My bad, that should have never made it into the PR.

Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-12-05 08:32:54 +01:00
trainman261
01e4e4dcc5
Update README.md
Added the media_type field
2023-12-05 08:13:08 +01:00
4 changed files with 4 additions and 19 deletions

View File

@ -1319,6 +1319,7 @@ The available fields are:
- `location` (string): Physical location where the video was filmed - `location` (string): Physical location where the video was filmed
- `duration` (numeric): Length of the video in seconds - `duration` (numeric): Length of the video in seconds
- `duration_string` (string): Length of the video (HH:mm:ss) - `duration_string` (string): Length of the video (HH:mm:ss)
- `media_type` (string): The type of media, for instance a full show, an excerpt, a highlight, or a trailer.
- `view_count` (numeric): How many users have watched the video on the platform - `view_count` (numeric): How many users have watched the video on the platform
- `concurrent_view_count` (numeric): How many users are currently watching the video on the platform. - `concurrent_view_count` (numeric): How many users are currently watching the video on the platform.
- `like_count` (numeric): Number of positive ratings of the video - `like_count` (numeric): Number of positive ratings of the video

View File

@ -180,19 +180,8 @@ class CBCPlayerIE(InfoExtractor):
'thumbnail': 'http://thumbnails.cbc.ca/maven_legacy/thumbnails/sonali-karnick-220.jpg', 'thumbnail': 'http://thumbnails.cbc.ca/maven_legacy/thumbnails/sonali-karnick-220.jpg',
'chapters': [], 'chapters': [],
'duration': 494.811, 'duration': 494.811,
'categories': [ 'categories': ['AudioMobile/All in a Weekend Montreal'],
'AudioMobile/All in a Weekend Montreal', 'tags': 'count:8',
],
'tags': [
'CBC',
'CBC Radio',
'Montreal',
'Quebec',
'All In A Weekend',
'Sonali Karnick',
'hackathon',
'listenmontreal',
],
'location': 'Quebec', 'location': 'Quebec',
'series': 'All in a Weekend Montreal', 'series': 'All in a Weekend Montreal',
'season': 'Season 2015', 'season': 'Season 2015',

View File

@ -73,7 +73,6 @@ class MediasetIE(ThePlatformBaseIE):
'season_number': 5, 'season_number': 5,
'episode_number': 5, 'episode_number': 5,
'chapters': [{'start_time': 0.0, 'end_time': 3409.08}, {'start_time': 3409.08, 'end_time': 6565.008}], 'chapters': [{'start_time': 0.0, 'end_time': 3409.08}, {'start_time': 3409.08, 'end_time': 6565.008}],
'creator': None,
'categories': [ 'categories': [
'Informazione', 'Informazione',
], ],

View File

@ -108,10 +108,6 @@ class ThePlatformBaseIE(OnceIE):
# A number of sites have custom-prefixed keys, e.g. 'cbc$seasonNumber' # 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 next((info[k] for k in info if k.endswith(f'${field}') and info[k] != ''), None)
info_media_type = extract_site_specific_field('programmingType')
if not info_media_type:
info_media_type = extract_site_specific_field('type')
return { return {
'title': info['title'], 'title': info['title'],
'subtitles': subtitles, 'subtitles': subtitles,
@ -128,7 +124,7 @@ class ThePlatformBaseIE(OnceIE):
'location': extract_site_specific_field('region'), 'location': extract_site_specific_field('region'),
'series': extract_site_specific_field('show'), 'series': extract_site_specific_field('show'),
'season_number': int_or_none(extract_site_specific_field('seasonNumber')), 'season_number': int_or_none(extract_site_specific_field('seasonNumber')),
'media_type': info_media_type, 'media_type': extract_site_specific_field('programmingType') or extract_site_specific_field('type'),
} }
def _extract_theplatform_metadata(self, path, video_id): def _extract_theplatform_metadata(self, path, video_id):