mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
Edit Tweakers extractor
Fixed code conventions (mainly adding two or more spaces before making an inline comment)
This commit is contained in:
parent
e3aaace400
commit
3ee6e02564
@ -25,10 +25,10 @@ class TweakersIE(InfoExtractor):
|
|||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
splitted_url = re.split('.html|/', url)
|
splitted_url = re.split('.html|/', url)
|
||||||
del splitted_url[-1] # To remove extra '/' at the end
|
del splitted_url[-1] # To remove extra '/' at the end
|
||||||
video_id = splitted_url[4]
|
video_id = splitted_url[4]
|
||||||
title = splitted_url[5].title() # Retrieve title for URL and capitalize
|
title = splitted_url[5].title() # Retrieve title for URL and capitalize
|
||||||
splitted_url[3] = splitted_url[3] + '/player' # Add /player to get the player page
|
splitted_url[3] = splitted_url[3] + '/player' # Add /player to get the player page
|
||||||
player_url = '/'.join(splitted_url) + '.html'
|
player_url = '/'.join(splitted_url) + '.html'
|
||||||
player_page = self._download_webpage(player_url, video_id)
|
player_page = self._download_webpage(player_url, video_id)
|
||||||
|
|
||||||
@ -36,6 +36,6 @@ def _real_extract(self, url):
|
|||||||
'id': video_id,
|
'id': video_id,
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': title,
|
'title': title,
|
||||||
'url': re.findall('http.*mp4', player_page)[0],
|
'url': re.findall('http.*mp4', player_page)[0],
|
||||||
'player_url': player_url
|
'player_url': player_url
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user