aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/streetvoice.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-21 13:07:53 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-21 13:07:53 +0800
commit4dccea8ad01d51dcdfd4ecc79442bbd30e29871e (patch)
tree35306573d4c5cb2f020340878145824fa7935142 /youtube_dl/extractor/streetvoice.py
parent2c0d9c6217f994b2742ff4e8e3fba7c7469b9f81 (diff)
downloadyoutube-dl-4dccea8ad01d51dcdfd4ecc79442bbd30e29871e.tar.xz
[streetvoice] Fix extraction
The old API results in URLs with HTTP 403 from time to time. Hopefully fixes #9219.
Diffstat (limited to 'youtube_dl/extractor/streetvoice.py')
-rw-r--r--youtube_dl/extractor/streetvoice.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/youtube_dl/extractor/streetvoice.py b/youtube_dl/extractor/streetvoice.py
index 6a57fa60a..e529051d1 100644
--- a/youtube_dl/extractor/streetvoice.py
+++ b/youtube_dl/extractor/streetvoice.py
@@ -14,7 +14,6 @@ class StreetVoiceIE(InfoExtractor):
'info_dict': {
'id': '94440',
'ext': 'mp3',
- 'filesize': 4167053,
'title': '輸',
'description': 'Crispy脆樂團 - 輸',
'thumbnail': 're:^https?://.*\.jpg$',
@@ -32,20 +31,19 @@ class StreetVoiceIE(InfoExtractor):
song_id = self._match_id(url)
song = self._download_json(
- 'http://streetvoice.com/music/api/song/%s' % song_id, song_id)
+ 'https://streetvoice.com/api/v1/public/song/%s/' % song_id, song_id, data=b'')
title = song['name']
- author = song['musician']['name']
+ author = song['user']['nickname']
return {
'id': song_id,
'url': song['file'],
- 'filesize': song.get('size'),
'title': title,
'description': '%s - %s' % (author, title),
'thumbnail': self._proto_relative_url(song.get('image'), 'http:'),
'duration': song.get('length'),
'upload_date': unified_strdate(song.get('created_at')),
'uploader': author,
- 'uploader_id': compat_str(song['musician']['id']),
+ 'uploader_id': compat_str(song['user']['id']),
}