about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-02-21 16:56:48 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-02-21 16:56:48 +0100
commit1013186a172a05d57e87857604719cae6b8d7049 (patch)
tree0f76b9a59bac4216a0bdf5f3524b76c1582bed32
parent7c038b3c32bac26d28782852d921a91e530317a6 (diff)
downloadyoutube-dl-1013186a172a05d57e87857604719cae6b8d7049.tar.gz
youtube-dl-1013186a172a05d57e87857604719cae6b8d7049.tar.xz
youtube-dl-1013186a172a05d57e87857604719cae6b8d7049.zip
Also check for JSLoader of JWSPlayer (thanks to @maximeg, Closes #685)
-rwxr-xr-xyoutube_dl/InfoExtractors.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index 23bd21af5..d3c3ac264 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -1367,6 +1367,9 @@ class GenericIE(InfoExtractor):
             # Broaden the search a little bit
             mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)
         if mobj is None:
+            # Broaden the search a little bit: JWPlayer JS loader
+            mobj = re.search(r'[^A-Za-z0-9]?file:\s*["\'](http[^\'"&]*)', webpage)
+        if mobj is None:
             self._downloader.trouble(u'ERROR: Invalid URL: %s' % url)
             return