1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-04 17:34:32 +01:00

[mixcloud] Fix track url transformation (fixes #2068)

‘/previews/‘ must be replaced with ‘/c/originals/‘ now.
This commit is contained in:
Jaime Marquínez Ferrándiz 2014-01-01 21:07:55 +01:00
parent 08d13955dd
commit 5ffecde73f

View File

@ -53,7 +53,7 @@ class MixcloudIE(InfoExtractor):
info = json.loads(json_data) info = json.loads(json_data)
preview_url = self._search_regex(r'data-preview-url="(.+?)"', webpage, u'preview url') preview_url = self._search_regex(r'data-preview-url="(.+?)"', webpage, u'preview url')
song_url = preview_url.replace('/previews/', '/cloudcasts/originals/') song_url = preview_url.replace('/previews/', '/c/originals/')
template_url = re.sub(r'(stream\d*)', 'stream%d', song_url) template_url = re.sub(r'(stream\d*)', 'stream%d', song_url)
final_song_url = self._get_url(template_url) final_song_url = self._get_url(template_url)
if final_song_url is None: if final_song_url is None: