mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-04 04:07:26 +00:00
[generic] Improve jwplayer detection (Fixes #2731)
This commit is contained in:
parent
f44e5d8b43
commit
c0292e8ab7
1 changed files with 7 additions and 1 deletions
|
@ -619,7 +619,13 @@ def _real_extract(self, url):
|
||||||
mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
|
mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
|
||||||
if mobj is None:
|
if mobj is None:
|
||||||
# Look for gorilla-vid style embedding
|
# Look for gorilla-vid style embedding
|
||||||
mobj = re.search(r'(?s)(?:jw_plugins|JWPlayerOptions).*?file\s*:\s*["\'](.*?)["\']', webpage)
|
mobj = re.search(r'''(?sx)
|
||||||
|
(?:
|
||||||
|
jw_plugins|
|
||||||
|
JWPlayerOptions|
|
||||||
|
jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
|
||||||
|
)
|
||||||
|
.*?file\s*:\s*["\'](.*?)["\']''', webpage)
|
||||||
if mobj is None:
|
if mobj is None:
|
||||||
# Broaden the search a little bit
|
# Broaden the search a little bit
|
||||||
mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)
|
mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)
|
||||||
|
|
Loading…
Reference in a new issue