mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-08 09:10:09 +01:00
[limelight] Add support for channels and channels lists embedded using LimelightEmbeddedPlayerFlash (#12761)
This commit is contained in:
parent
e5d39886ec
commit
91bc57e4c5
@ -30,7 +30,6 @@ def _extract_urls(cls, webpage, source_url):
|
|||||||
for kind, video_id in re.findall(
|
for kind, video_id in re.findall(
|
||||||
r'LimelightPlayer\.doLoad(Media|Channel|ChannelList)\(["\'](?P<id>[a-z0-9]{32})',
|
r'LimelightPlayer\.doLoad(Media|Channel|ChannelList)\(["\'](?P<id>[a-z0-9]{32})',
|
||||||
webpage):
|
webpage):
|
||||||
print('video_id', video_id)
|
|
||||||
entries.append(cls.url_result(
|
entries.append(cls.url_result(
|
||||||
smuggle_url(
|
smuggle_url(
|
||||||
'limelight:%s:%s' % (lm[kind], video_id),
|
'limelight:%s:%s' % (lm[kind], video_id),
|
||||||
@ -46,13 +45,14 @@ def _extract_urls(cls, webpage, source_url):
|
|||||||
<object[^>]+class=(["\'])(?:(?!\1).)*\bLimelightEmbeddedPlayerFlash\b(?:(?!\1).)*\1[^>]*>.*?
|
<object[^>]+class=(["\'])(?:(?!\1).)*\bLimelightEmbeddedPlayerFlash\b(?:(?!\1).)*\1[^>]*>.*?
|
||||||
<param[^>]+
|
<param[^>]+
|
||||||
name=(["\'])flashVars\2[^>]+
|
name=(["\'])flashVars\2[^>]+
|
||||||
value=(["\'])(?:(?!\3).)*mediaId=(?P<id>[a-z0-9]{32})
|
value=(["\'])(?:(?!\3).)*(?P<kind>media|channel(?:List)?)Id=(?P<id>[a-z0-9]{32})
|
||||||
''', webpage):
|
''', webpage):
|
||||||
|
kind, video_id = mobj.group('kind'), mobj.group('id')
|
||||||
entries.append(cls.url_result(
|
entries.append(cls.url_result(
|
||||||
smuggle_url(
|
smuggle_url(
|
||||||
'limelight:media:%s' % mobj.group('id'),
|
'limelight:%s:%s' % (kind, video_id),
|
||||||
{'source_url': source_url}),
|
{'source_url': source_url}),
|
||||||
'LimelightMedia', mobj.group('id')))
|
'Limelight%s' % kind.capitalize(), video_id))
|
||||||
return entries
|
return entries
|
||||||
|
|
||||||
def _call_playlist_service(self, item_id, method, fatal=True, referer=None):
|
def _call_playlist_service(self, item_id, method, fatal=True, referer=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user