- download_form = dict(re.findall(
- r'<input type="hidden" name="([^"]+)" value="([^"]*)"', webpage))
- request = compat_urllib_request.Request(
- url, compat_urllib_parse.urlencode(download_form))
+ download_form = self._hidden_inputs(webpage)
+ request = sanitized_Request(
+ url, urlencode_postdata(download_form))