mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
[extractor/common] Add method for extracting form hidden input fields as dict
This commit is contained in:
parent
c0bf5e1c4d
commit
27713812a0
1 changed files with 6 additions and 0 deletions
|
@ -705,6 +705,12 @@ def _twitter_search_player(self, html):
|
|||
return self._html_search_meta('twitter:player', html,
|
||||
'twitter card player')
|
||||
|
||||
@staticmethod
|
||||
def _form_hidden_inputs(html):
|
||||
return dict(re.findall(
|
||||
r'<input\s+type="hidden"\s+name="([^"]+)"\s+(?:id="[^"]+"\s+)?value="([^"]*)"',
|
||||
html))
|
||||
|
||||
def _sort_formats(self, formats, field_preference=None):
|
||||
if not formats:
|
||||
raise ExtractorError('No video formats found')
|
||||
|
|
Loading…
Reference in a new issue