mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-26 05:05:54 +01:00
[hostingbulk] Use _form_hidden_inputs
This commit is contained in:
parent
01b89d5682
commit
8fa7e5817a
@ -58,11 +58,7 @@ def _real_extract(self, url):
|
|||||||
r'<img src="([^"]+)".+?class="pic"',
|
r'<img src="([^"]+)".+?class="pic"',
|
||||||
webpage, 'thumbnail', fatal=False)
|
webpage, 'thumbnail', fatal=False)
|
||||||
|
|
||||||
fields = dict(re.findall(r'''(?x)<input\s+
|
fields = self._form_hidden_inputs(webpage)
|
||||||
type="hidden"\s+
|
|
||||||
name="([^"]+)"\s+
|
|
||||||
value="([^"]*)"
|
|
||||||
''', webpage))
|
|
||||||
|
|
||||||
request = compat_urllib_request.Request(url, urlencode_postdata(fields))
|
request = compat_urllib_request.Request(url, urlencode_postdata(fields))
|
||||||
request.add_header('Content-type', 'application/x-www-form-urlencoded')
|
request.add_header('Content-type', 'application/x-www-form-urlencoded')
|
||||||
|
Loading…
Reference in New Issue
Block a user