Browse Source

[hostingbulk] Use `_form_hidden_inputs`

totalwebcasting
Sergey M․ 10 years ago
parent
commit
8fa7e5817a
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      youtube_dl/extractor/hostingbulk.py

+ 1
- 5
youtube_dl/extractor/hostingbulk.py View File

@ -58,11 +58,7 @@ class HostingBulkIE(InfoExtractor):
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+
type="hidden"\s+
name="([^"]+)"\s+
value="([^"]*)"
''', webpage))
fields = self._form_hidden_inputs(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…
Cancel
Save