1 from .common
import InfoExtractor
10 class WhypIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?whyp\.it/tracks/(?P<id>\d+)'
13 'url': 'https://www.whyp.it/tracks/18337/home-page-example-track-b4kq7',
14 'md5': 'c1187b42ebf8605284e3dc92aeb33d16',
16 'url': 'https://cdn.whyp.it/50eb17cc-e9ff-4e18-b89b-dc9206a95cb1.mp3',
18 'title': 'Home Page Example Track',
19 'description': 'md5:bd758000fb93f3159339c852b5b9133c',
24 'thumbnail': 'https://cdn.whyp.it/a537bb36-3373-4c61-96c8-27fc1b2f427a.jpg',
27 'url': 'https://www.whyp.it/tracks/18337',
28 'only_matching': True,
31 def _real_extract(self
, url
):
32 unique_id
= self
._match
_id
(url
)
33 webpage
= self
._download
_webpage
(url
, unique_id
)
34 data
= self
._search
_nuxt
_data
(webpage
, unique_id
)['rawTrack']
37 'url': data
['audio_url'],
39 **traverse_obj(data
, {
41 'description': 'description',
42 'duration': ('duration', {float_or_none}
),
43 'uploader': ('user', 'username'),
44 'uploader_id': ('user', 'id', {str_or_none}
),
45 'thumbnail': ('artwork_url', {url_or_none}
),
49 'http_headers': {'Referer': 'https://whyp.it/'},