-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathKKBox.src
More file actions
executable file
·158 lines (124 loc) · 2.52 KB
/
KKBox.src
File metadata and controls
executable file
·158 lines (124 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Mp3tag parser for kkbox website
#
# Src created by otacorn(玉米)
# https://otacorn.blogspot.com
#
# #################################
[Name]=KKbox
[BasedOn]=http://www.kkbox.com
[IndexUrl]=http://www.kkbox.com/tw/tc/search.php?search=album&word=%s
[AlbumUrl]=http://www.kkbox.com
[WordSeperator]=+
[IndexFormat]=%_url%|%Album%|%Artist%
[SearchBy]=%album%
[Encoding]=url-utf-8
[ParserScriptIndex]=...
# ###################################################################
# I N D E X
# ###################################################################
debug "on" "c:\\debug_kkbox1.htm"
findline "class=\"search-group\""
do
findline "class=\"album\""
findline "class=\"cover\""
# Url
findinline "href=\""
sayuntil "\""
say "|"
# Album
findinline "title=\""
sayuntil "\""
say "|"
# Artist
findline "playlist-sharer"
findline "<a href"
findinline "title=\""
sayuntil "\""
saynewline
findline "<div class" 2
findinline "class=\""
while "album"
[ParserScriptAlbum]=...
# ###################################################################
# A L B U M
# ###################################################################
debug "on" "c:\\debug_kkbox2.htm"
# CoverURL
outputto "coverurl"
findline "class=\"album-pic\""
findline "<img src=\""
findinline "src=\""
sayuntil "\""
# Album
outputto "Album"
# findline "class=\"fa fa-angle-right\""
# findline "span"
findline "<h1"
moveline 1
# sayregexp "[^\n]+"
sayuntil "</"
gotoline 1
findline "class=\"media-tag"
# Artist
outputto "artist"
findline "tit-16"
moveline 1
findline ">"
findinline ">"
sayuntil "<"
# rewind
gotoline 1
findline "class=\"media-tag"
findline "</div"
# Genre
outputto "Genre"
moveline -1
findinline ">"
sayuntil "</"
# Year
outputto "Year"
moveline -3
findinline ">"
saynextnumber
findline "song-list js-song-list"
do
# Track
outputto "track temp"
findline "data-song_idx"
findinline "data-song_idx=\""
saynextnumber
say "|"
outputto "_length"
findline "class=\"time\""
findinline ">"
sayuntil "</"
say "|"
# Title
outputto "title temp"
findline "class=\"song-data"
findline "<a href="
findinline ">"
sayuntil "</"
say "|"
# tracks ++
outputto "tracks"
say "|"
findline "</li"
# findinline "</li "
moveline 2
findinline "<"
if "li class=\"clearfix\""
# outputto "track temp"
# say "|"
# outputto "title temp"
# say "|"
# outputto "tracks"
# say "|"
endif
while "li class=\"clearfix\""
outputto "title"
sayoutput "title temp"
outputto "track"
sayoutput "track temp"
set "title temp"
set "track temp"