projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
376817c
)
[youporn] Imrove JSON regex and preserve the old one
author
Sergey M․
<dstftw@gmail.com>
Tue, 3 Mar 2015 15:39:04 +0000
(21:39 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 3 Mar 2015 15:39:04 +0000
(21:39 +0600)
youtube_dl/extractor/youporn.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youporn.py
b/youtube_dl/extractor/youporn.py
index a278386d4ded92b455ef99a0a5acc4935480efcd..e4c855ee0e3616981c77d41b441f15adf6ce0453 100644
(file)
--- 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)