aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-04-21 16:16:53 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-04-21 16:16:53 +0200
commitc0292e8ab716ea48655a4d301b4ca34ddbe24250 (patch)
tree6cb40370cd5a9ca6e25d96b08324c24d42f7fa2d
parentf44e5d8b43a5890fcdd962b5300da71dad323b63 (diff)
[generic] Improve jwplayer detection (Fixes #2731)
-rw-r--r--youtube_dl/extractor/generic.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 3c9f98dc3..13064e2cd 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -619,7 +619,13 @@ class GenericIE(InfoExtractor):
mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
if mobj is None:
# 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:
# Broaden the search a little bit
mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)