]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Made generic IE handle more cases
authorAlbert Kim <alkim1234@gmail.com>
Thu, 27 Jun 2013 18:16:09 +0000 (19:16 +0100)
committerAlbert Kim <alkim1234@gmail.com>
Thu, 27 Jun 2013 18:16:09 +0000 (19:16 +0100)
Added a possible quote after file, so it can now handle cases like:
'file': 'http://www.a.com/b.mp4'

youtube_dl/extractor/generic.py

index 7a877b3bcb4e51dfb68a3cbc2720ce52d17c4be9..eaaca98047e99d13fa0ad0ad59d5fabea59dc3f6 100644 (file)
@@ -102,7 +102,7 @@ class GenericIE(InfoExtractor):
             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)
+            mobj = re.search(r'[^A-Za-z0-9]?file["\']?:\s*["\'](http[^\'"&]*)', webpage)
         if mobj is None:
             # Try to find twitter cards info
             mobj = re.search(r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage)