Skip to content

Commit 66623dc

Browse files
authored
Adding support for the Yandex Music service.
Also, this YML file is a good example of using constructs like: choose-when-otherwise
1 parent a1b59fd commit 66623dc

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

collection/sites/yamusic.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Yandex Music"
2+
host: music.yandex.ru
3+
example: https://music.yandex.ru/album/5307396/track/38633706
4+
extract: "!music\\.yandex\\.ru(\\/album\\/(?'aid'\\d+)(\\/track\\/(?'tid'\\d+))?|\\/users\\/(?'uid'\\w+)\\/playlists\\/(?'pid'\\d+))!"
5+
choose:
6+
when:
7+
test: "@uid"
8+
iframe:
9+
height: "450"
10+
width: "100%"
11+
src: //music.yandex.ru/iframe/#playlist/{@uid}/{@pid}
12+
otherwise:
13+
choose:
14+
when:
15+
test: "@tid"
16+
iframe:
17+
height: "100"
18+
width: "100%"
19+
src: //music.yandex.ru/iframe/#track/{@tid}/{@aid}
20+
otherwise:
21+
iframe:
22+
height: "450"
23+
width: "100%"
24+
src: //music.yandex.ru/iframe/#album/{@aid}

0 commit comments

Comments
 (0)