page = self._download_webpage(
'http://%s/%s.html' % (self._HOST, video_id), video_id, 'Downloading video page')
page = self._download_webpage(
'http://%s/%s.html' % (self._HOST, video_id), video_id, 'Downloading video page')
post_data = compat_urllib_parse.urlencode(encode_dict(form_str)).encode('ascii')
req = compat_urllib_request.Request(url, post_data)
req.add_header('Content-type', 'application/x-www-form-urlencoded')
post_data = compat_urllib_parse.urlencode(encode_dict(form_str)).encode('ascii')
req = compat_urllib_request.Request(url, post_data)
req.add_header('Content-type', 'application/x-www-form-urlencoded')
- for key, morsel in cookies.iteritems():
- req.add_header('Cookie', '%s=%s' % (morsel.key, morsel.value))
+ cookie_string = ""
+ for key in cookies.keys():
+ cookie_string += "%s=%s;" % (key, cookies[key].value)
+
+ req.add_header('Cookie', '%s' % cookie_string)
file_link = self._search_regex(file_link_regex, post_result, 'file_link', fatal=True)
return {
file_link = self._search_regex(file_link_regex, post_result, 'file_link', fatal=True)
return {