mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 18:34:32 +01:00
[nexx] Improve JS embed extraction
This commit is contained in:
parent
decf86044d
commit
089b97cfee
@ -72,13 +72,17 @@ class NexxIE(InfoExtractor):
|
|||||||
entries = []
|
entries = []
|
||||||
|
|
||||||
# JavaScript Integration
|
# JavaScript Integration
|
||||||
for domain_id, video_id in re.findall(
|
mobj = re.search(
|
||||||
r'''(?isx)
|
r'<script\b[^>]+\bsrc=["\']https?://require\.nexx(?:\.cloud|cdn\.com)/(?P<id>\d+)',
|
||||||
<script\b[^>]+\bsrc=["\']https?://require\.nexx(?:\.cloud|cdn\.com)/(\d+).+?
|
webpage)
|
||||||
onPLAYReady.+?
|
if mobj:
|
||||||
_play\.init\s*\(.+?\s*,\s*(\d+)\s*,\s*.+?\)
|
domain_id = mobj.group('id')
|
||||||
''', webpage):
|
for video_id in re.findall(
|
||||||
entries.append('https://api.nexx.cloud/v3/%s/videos/byid/%s' % (domain_id, video_id))
|
r'(?is)onPLAYReady.+?_play\.init\s*\(.+?\s*,\s*["\']?(\d+)',
|
||||||
|
webpage):
|
||||||
|
entries.append(
|
||||||
|
'https://api.nexx.cloud/v3/%s/videos/byid/%s'
|
||||||
|
% (domain_id, video_id))
|
||||||
|
|
||||||
# TODO: support more embed formats
|
# TODO: support more embed formats
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user