1 from .common
import InfoExtractor
8 class ReverbNationIE(InfoExtractor
):
9 _VALID_URL
= r
'^https?://(?:www\.)?reverbnation\.com/.*?/song/(?P<id>\d+).*?$'
11 'url': 'http://www.reverbnation.com/alkilados/song/16965047-mona-lisa',
12 'md5': 'c0aaf339bcee189495fdf5a8c8ba8645',
17 'uploader': 'ALKILADOS',
18 'uploader_id': '216429',
19 'thumbnail': r
're:^https?://.*\.jpg',
23 def _real_extract(self
, url
):
24 song_id
= self
._match
_id
(url
)
26 api_res
= self
._download
_json
(
27 f
'https://api.reverbnation.com/song/{song_id}',
29 note
=f
'Downloading information of song {song_id}',
32 THUMBNAILS
= ('thumbnail', 'image')
33 quality
= qualities(THUMBNAILS
)
35 for thumb_key
in THUMBNAILS
:
36 if api_res
.get(thumb_key
):
38 'url': api_res
[thumb_key
],
39 'preference': quality(thumb_key
),
44 'title': api_res
['name'],
45 'url': api_res
['url'],
46 'uploader': api_res
.get('artist', {}).get('name'),
47 'uploader_id': str_or_none(api_res
.get('artist', {}).get('id')),
48 'thumbnails': thumbnails
,