[youporn] Fix JSON parameter regexp (Fixes #4384)
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 5 Dec 2014 23:48:29 +0000 (00:48 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Fri, 5 Dec 2014 23:48:29 +0000 (00:48 +0100)
youtube_dl/extractor/youporn.py

index 8123928be982dbaccb98638ea0b915007ebc7066..d9c06a2ee6d934391560b6ca7db4ebecf40ff1d0 100644 (file)
@@ -45,7 +45,9 @@ class YouPornIE(InfoExtractor):
         age_limit = self._rta_search(webpage)
 
         # Get JSON parameters
-        json_params = self._search_regex(r'var currentVideo = new Video\((.*)\);', webpage, 'JSON parameters')
+        json_params = self._search_regex(
+            r'var currentVideo = new Video\((.*)\)[,;]',
+            webpage, 'JSON parameters')
         try:
             params = json.loads(json_params)
         except: