[Promtfile] fix
This commit is contained in:
parent
625ad7dc28
commit
e08461c0e8
@ -16,7 +16,7 @@ class PromptFileIE(InfoExtractor):
|
|||||||
_VALID_URL = r'https?://(?:www\.)?promptfile\.com/l/(?P<id>[0-9A-Z\-]+)'
|
_VALID_URL = r'https?://(?:www\.)?promptfile\.com/l/(?P<id>[0-9A-Z\-]+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'http://www.promptfile.com/l/86D1CE8462-576CAAE416',
|
'url': 'http://www.promptfile.com/l/86D1CE8462-576CAAE416',
|
||||||
'md5': '2125298091532905922013119cc3d2e9',
|
'md5': '5a7e285a26e0d66d9a263fae91bc92ce',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '86D1CE8462-576CAAE416',
|
'id': '86D1CE8462-576CAAE416',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
@ -34,9 +34,9 @@ class PromptFileIE(InfoExtractor):
|
|||||||
expected=True)
|
expected=True)
|
||||||
|
|
||||||
chash_pattern = r'\$\("#chash"\)\.val\("(.+)"\+\$\("#chash"\)'
|
chash_pattern = r'\$\("#chash"\)\.val\("(.+)"\+\$\("#chash"\)'
|
||||||
chash = self._search_regex(chash_pattern, webpage, "chash")
|
chash = self._html_search_regex(chash_pattern, webpage, "chash")
|
||||||
fields = self._hidden_inputs(webpage)
|
fields = self._hidden_inputs(webpage)
|
||||||
k = fields.keys()[0]
|
k = list(fields)[0]
|
||||||
fields[k] = chash + fields[k]
|
fields[k] = chash + fields[k]
|
||||||
|
|
||||||
post = urlencode_postdata(fields)
|
post = urlencode_postdata(fields)
|
||||||
@ -45,7 +45,8 @@ class PromptFileIE(InfoExtractor):
|
|||||||
webpage = self._download_webpage(
|
webpage = self._download_webpage(
|
||||||
req, video_id, 'Downloading video page')
|
req, video_id, 'Downloading video page')
|
||||||
|
|
||||||
url = self._html_search_regex(r'url:\s*\'([^\']+)\'', webpage, 'URL')
|
url_pattern = r'<a href="(http://www\.promptfile\.com/file/[^"]+)'
|
||||||
|
url = self._html_search_regex(url_pattern, webpage, 'URL')
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'<span.+title="([^"]+)">', webpage, 'title')
|
r'<span.+title="([^"]+)">', webpage, 'title')
|
||||||
thumbnail = self._html_search_regex(
|
thumbnail = self._html_search_regex(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user