mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-27 19:36:50 +01:00
[tudou] Extract player URL from the webpage
This commit is contained in:
parent
c71a3195af
commit
238755752f
@ -56,6 +56,10 @@ class TudouIE(InfoExtractor):
|
||||
thumbnail_url = self._search_regex(
|
||||
r",pic:\s*[\"'](.+?)[\"']", webpage, 'thumbnail URL', fatal=False)
|
||||
|
||||
player_url = self._search_regex(
|
||||
r"playerUrl\s*:\s*['\"](.+?\.swf)[\"']",
|
||||
webpage, 'player URL', default=self._PLAYER_URL)
|
||||
|
||||
segs_json = self._search_regex(r'segs: \'(.*)\'', webpage, 'segments')
|
||||
segments = json.loads(segs_json)
|
||||
# It looks like the keys are the arguments that have to be passed as
|
||||
@ -79,7 +83,7 @@ class TudouIE(InfoExtractor):
|
||||
'title': title,
|
||||
'thumbnail': thumbnail_url,
|
||||
'http_headers': {
|
||||
'Referer': self._PLAYER_URL,
|
||||
'Referer': player_url,
|
||||
},
|
||||
}
|
||||
result.append(part_info)
|
||||
|
Loading…
Reference in New Issue
Block a user