aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youporn.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-03-03 21:39:04 +0600
committerSergey M․ <dstftw@gmail.com>2015-03-03 21:39:04 +0600
commit50c9949d7ae8f76d7a105481e0e692de3448c385 (patch)
treea4923f358b86007a14a16df6ccc4c3c56dd0e241 /youtube_dl/extractor/youporn.py
parent376817c6d48b0915502e687655e266d80cb45a7a (diff)
[youporn] Imrove JSON regex and preserve the old one
Diffstat (limited to 'youtube_dl/extractor/youporn.py')
-rw-r--r--youtube_dl/extractor/youporn.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youporn.py b/youtube_dl/extractor/youporn.py
index a278386d4..e4c855ee0 100644
--- a/youtube_dl/extractor/youporn.py
+++ b/youtube_dl/extractor/youporn.py
@@ -47,7 +47,8 @@ class YouPornIE(InfoExtractor):
# Get JSON parameters
json_params = self._search_regex(
- r'var videoJason = (.*)[,;]',
+ [r'var\s+videoJa?son\s*=\s*({.+?});',
+ r'var\s+currentVideo\s*=\s*new\s+Video\((.+?)\)[,;]'],
webpage, 'JSON parameters')
try:
params = json.loads(json_params)