1 from .common
import InfoExtractor
4 class MuseScoreIE(InfoExtractor
):
5 _VALID_URL
= r
'https?://(?:www\.)?musescore\.com/(?:user/\d+|[^/]+)(?:/scores)?/(?P<id>[^#&?]+)'
7 'url': 'https://musescore.com/user/73797/scores/142975',
11 'title': 'WA Mozart Marche Turque (Turkish March fingered)',
12 'description': 'md5:7ede08230e4eaabd67a4a98bb54d07be',
13 'thumbnail': r
're:https?://(?:www\.)?musescore\.com/.*\.png[^$]+',
14 'uploader': 'PapyPiano',
15 'creator': 'Wolfgang Amadeus Mozart',
18 'url': 'https://musescore.com/user/36164500/scores/6837638',
22 'title': 'Sweet Child O\' Mine – Guns N\' Roses sweet child',
23 'description': 'md5:4dca71191c14abc312a0a4192492eace',
24 'thumbnail': r
're:https?://(?:www\.)?musescore\.com/.*\.png[^$]+',
25 'uploader': 'roxbelviolin',
26 'creator': 'Guns N´Roses Arr. Roxbel Violin',
29 'url': 'https://musescore.com/classicman/fur-elise',
33 'title': 'Für Elise – Beethoven',
34 'description': 'md5:49515a3556d5ecaf9fa4b2514064ac34',
35 'thumbnail': r
're:https?://(?:www\.)?musescore\.com/.*\.png[^$]+',
36 'uploader': 'ClassicMan',
37 'creator': 'Ludwig van Beethoven (1770–1827)',
40 'url': 'https://musescore.com/minh_cuteee/scores/6555384',
41 'only_matching': True,
44 def _real_extract(self
, url
):
45 webpage
= self
._download
_webpage
(url
, None)
46 url
= self
._og
_search
_url
(webpage
) or url
47 video_id
= self
._match
_id
(url
)
48 mp3_url
= self
._download
_json
(f
'https://musescore.com/api/jmuse?id={video_id}&index=0&type=mp3&v2=1', video_id
,
49 headers
={'authorization': '63794e5461e4cfa046edfbdddfccc1ac16daffd2'})['info']['url']
59 'title': self
._og
_search
_title
(webpage
),
60 'description': self
._og
_search
_description
(webpage
),
61 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
62 'uploader': self
._html
_search
_meta
('musescore:author', webpage
, 'uploader'),
63 'creator': self
._html
_search
_meta
('musescore:composer', webpage
, 'composer'),