parent
fc5fa964c7
commit
6970b6005e
12 changed files with 26 additions and 22 deletions
|
|
@ -78,11 +78,11 @@ class CanalAlphaIE(InfoExtractor):
|
|||
'height': try_get(video, lambda x: x['res']['height'], expected_type=int),
|
||||
} for video in try_get(data_json, lambda x: x['video']['mp4'], expected_type=list) or [] if video.get('$url')]
|
||||
if manifests.get('hls'):
|
||||
m3u8_frmts, m3u8_subs = self._parse_m3u8_formats_and_subtitles(manifests['hls'], id)
|
||||
m3u8_frmts, m3u8_subs = self._parse_m3u8_formats_and_subtitles(manifests['hls'], video_id=id)
|
||||
formats.extend(m3u8_frmts)
|
||||
subtitles = self._merge_subtitles(subtitles, m3u8_subs)
|
||||
if manifests.get('dash'):
|
||||
dash_frmts, dash_subs = self._parse_mpd_formats_and_subtitles(manifests['dash'], id)
|
||||
dash_frmts, dash_subs = self._parse_mpd_formats_and_subtitles(manifests['dash'])
|
||||
formats.extend(dash_frmts)
|
||||
subtitles = self._merge_subtitles(subtitles, dash_subs)
|
||||
self._sort_formats(formats)
|
||||
|
|
|
|||
|
|
@ -3504,8 +3504,6 @@ class InfoExtractor(object):
|
|||
|
||||
def _int(self, v, name, fatal=False, **kwargs):
|
||||
res = int_or_none(v, **kwargs)
|
||||
if 'get_attr' in kwargs:
|
||||
print(getattr(v, kwargs['get_attr']))
|
||||
if res is None:
|
||||
msg = 'Failed to extract %s: Could not parse value %r' % (name, v)
|
||||
if fatal:
|
||||
|
|
|
|||
|
|
@ -74,13 +74,11 @@ class DigitallySpeakingIE(InfoExtractor):
|
|||
tbr = int_or_none(bitrate)
|
||||
vbr = int_or_none(self._search_regex(
|
||||
r'-(\d+)\.mp4', video_path, 'vbr', default=None))
|
||||
abr = tbr - vbr if tbr and vbr else None
|
||||
video_formats.append({
|
||||
'format_id': bitrate,
|
||||
'url': url,
|
||||
'tbr': tbr,
|
||||
'vbr': vbr,
|
||||
'abr': abr,
|
||||
})
|
||||
return video_formats
|
||||
|
||||
|
|
@ -121,6 +119,7 @@ class DigitallySpeakingIE(InfoExtractor):
|
|||
video_formats = self._parse_mp4(metadata)
|
||||
if video_formats is None:
|
||||
video_formats = self._parse_flv(metadata)
|
||||
self._sort_formats(video_formats)
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
|
|
|
|||
|
|
@ -3804,6 +3804,7 @@ class GenericIE(InfoExtractor):
|
|||
json_ld['formats'], json_ld['subtitles'] = self._extract_m3u8_formats_and_subtitles(
|
||||
json_ld['url'], video_id, 'mp4')
|
||||
json_ld.pop('url')
|
||||
self._sort_formats(json_ld['formats'])
|
||||
return merge_dicts(json_ld, info_dict)
|
||||
|
||||
def check_video(vurl):
|
||||
|
|
@ -3858,7 +3859,7 @@ class GenericIE(InfoExtractor):
|
|||
protocol, _, _ = url.partition('/')
|
||||
thumbnail = protocol + thumbnail
|
||||
|
||||
url_keys = list(filter(re.compile(r'video_url|video_alt_url\d+').fullmatch, flashvars.keys()))
|
||||
url_keys = list(filter(re.compile(r'video_url|video_alt_url\d*').fullmatch, flashvars.keys()))
|
||||
formats = []
|
||||
for key in url_keys:
|
||||
if '/get_file/' not in flashvars[key]:
|
||||
|
|
|
|||
|
|
@ -177,9 +177,6 @@ class GlomexEmbedIE(GlomexBaseIE):
|
|||
|
||||
@classmethod
|
||||
def _extract_urls(cls, webpage, origin_url):
|
||||
# in comparison with _VALID_URL:
|
||||
# * make the scheme optional
|
||||
# * simplify the query string part; after extracting iframe src, the URL will be matched again
|
||||
VALID_SRC = rf'(?:https?:)?{cls._BASE_PLAYER_URL_RE}\?(?:(?!(?P=_q1)).)+'
|
||||
|
||||
# https://docs.glomex.com/publisher/video-player-integration/javascript-api/
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
|||
|
||||
_RESERVED_NAMES = (
|
||||
r'channel|c|user|playlist|watch|w|v|embed|e|watch_popup|clip|'
|
||||
r'shorts|movies|results|shared|hashtag|trending|feed|feeds|'
|
||||
r'shorts|movies|results|shared|hashtag|trending|explore|feed|feeds|'
|
||||
r'browse|oembed|get_video_info|iframe_api|s/player|'
|
||||
r'storefront|oops|index|account|reporthistory|t/terms|about|upload|signin|logout')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue