mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
[vimeo] Add another config regex (closes #17013)
This commit is contained in:
parent
11330f5121
commit
6fc09f0155
1 changed files with 2 additions and 1 deletions
|
@ -539,9 +539,10 @@ def _real_extract(self, url):
|
||||||
# We try to find out to which variable is assigned the config dic
|
# We try to find out to which variable is assigned the config dic
|
||||||
m_variable_name = re.search(r'(\w)\.video\.id', webpage)
|
m_variable_name = re.search(r'(\w)\.video\.id', webpage)
|
||||||
if m_variable_name is not None:
|
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:
|
else:
|
||||||
config_re = [r' = {config:({.+?}),assets:', r'(?:[abc])=({.+?});']
|
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',
|
config = self._search_regex(config_re, webpage, 'info section',
|
||||||
flags=re.DOTALL)
|
flags=re.DOTALL)
|
||||||
config = json.loads(config)
|
config = json.loads(config)
|
||||||
|
|
Loading…
Reference in a new issue