mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-27 23:56:51 +01:00
[extractor/common] Add _form_hidden_inputs
This commit is contained in:
parent
f8da79f828
commit
cf61d96df0
@ -718,6 +718,12 @@ class InfoExtractor(object):
|
|||||||
''', html)
|
''', html)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
def _form_hidden_inputs(self, form_id, html):
|
||||||
|
form = self._search_regex(
|
||||||
|
r'(?s)<form[^>]+?id=(["\'])%s\1[^>]*>(?P<form>.+?)</form>' % form_id,
|
||||||
|
html, '%s form' % form_id, group='form')
|
||||||
|
return self._hidden_inputs(form)
|
||||||
|
|
||||||
def _sort_formats(self, formats, field_preference=None):
|
def _sort_formats(self, formats, field_preference=None):
|
||||||
if not formats:
|
if not formats:
|
||||||
raise ExtractorError('No video formats found')
|
raise ExtractorError('No video formats found')
|
||||||
|
Loading…
Reference in New Issue
Block a user