projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11330f5
)
[vimeo] Add another config regex (closes #17013)
author
Sergey M․
<dstftw@gmail.com>
Thu, 19 Jul 2018 16:14:20 +0000
(23:14 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 19 Jul 2018 16:15:27 +0000
(23:15 +0700)
youtube_dl/extractor/vimeo.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vimeo.py
b/youtube_dl/extractor/vimeo.py
index 3baa2d075543fe951db281e081da8527aeced13c..e49b233f2b98ebf5cf559e9e80d8a06a0687381f 100644
(file)
--- a/
youtube_dl/extractor/vimeo.py
+++ b/
youtube_dl/extractor/vimeo.py
@@
-539,9
+539,10
@@
class VimeoIE(VimeoBaseInfoExtractor):
# We try to find out to which variable is assigned the config dic
m_variable_name = re.search(r'(\w)\.video\.id', webpage)
if m_variable_name is not None:
# We try to find out to which variable is assigned the config dic
m_variable_name = re.search(r'(\w)\.video\.id', webpage)
if m_variable_name is not None:
- config_re =
r'%s=({[^}].+?});' % re.escape(m_variable_name.group(1))
+ config_re =
[r'%s=({[^}].+?});' % re.escape(m_variable_name.group(1))]
else:
config_re = [r' = {config:({.+?}),assets:', r'(?:[abc])=({.+?});']
else:
config_re = [r' = {config:({.+?}),assets:', r'(?:[abc])=({.+?});']
+ config_re.append(r'\bvar\s+r\s*=\s*({.+?})\s*;')
config = self._search_regex(config_re, webpage, 'info section',
flags=re.DOTALL)
config = json.loads(config)
config = self._search_regex(config_re, webpage, 'info section',
flags=re.DOTALL)
config = json.loads(config)