mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-26 13:53:45 +03:00
[ie/atptour] add extractor and updated data extraction function
This commit is contained in:
@@ -1779,7 +1779,7 @@ class InfoExtractor:
|
||||
return traverse_obj(ret, traverse) or {}
|
||||
|
||||
@staticmethod
|
||||
def _hidden_inputs(html):
|
||||
def _hidden_inputs(html, attr_list=('name', 'id')):
|
||||
html = re.sub(r'<!--(?:(?!<!--).)*-->', '', html)
|
||||
hidden_inputs = {}
|
||||
for input_el in re.findall(r'(?i)(<input[^>]+>)', html):
|
||||
@@ -1788,7 +1788,10 @@ class InfoExtractor:
|
||||
continue
|
||||
if attrs.get('type') not in ('hidden', 'submit'):
|
||||
continue
|
||||
name = attrs.get('name') or attrs.get('id')
|
||||
for attr in variadic(attr_list):
|
||||
name = attrs.get(attr)
|
||||
if name is not None:
|
||||
break
|
||||
value = attrs.get('value')
|
||||
if name and value is not None:
|
||||
hidden_inputs[name] = value
|
||||
|
||||
Reference in New Issue
Block a user