mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-09-12 08:39:29 -04:00
[4tube] Style and make more robust
This commit is contained in:
parent
b90b0c4ffa
commit
96c4855331
@ -66,8 +66,11 @@ class FourTubeIE(InfoExtractor):
|
|||||||
webpage, 'like count', fatal=False))
|
webpage, 'like count', fatal=False))
|
||||||
duration = parse_duration(self._html_search_meta('duration', webpage))
|
duration = parse_duration(self._html_search_meta('duration', webpage))
|
||||||
|
|
||||||
player_url = self._search_regex(r'<script id="playerembed" src="([^"]+)">',webpage,'player javascript')
|
player_js = self._download_webpage(
|
||||||
player_js = self._download_webpage(player_url,video_id,'Downloading player Javascript')
|
self._search_regex(
|
||||||
|
r'<script[^>]id=(["\'])playerembed\1[^>]+src=(["\'])(?P<url>.+?)\2',
|
||||||
|
webpage, 'player JS', group='url'),
|
||||||
|
video_id, 'Downloading player JS')
|
||||||
|
|
||||||
params_js = self._search_regex(
|
params_js = self._search_regex(
|
||||||
r'\$\.ajax\(url,\ opts\);\s*\}\s*\}\)\(([0-9,\[\] ]+)\)',
|
r'\$\.ajax\(url,\ opts\);\s*\}\s*\}\)\(([0-9,\[\] ]+)\)',
|
||||||
|
Loading…
Reference in New Issue
Block a user