ehbrs-tools 0.25.1 → 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +30 -14
- data/lib/ehbrs/{core_ext.rb → tools/core_ext.rb} +0 -0
- data/lib/ehbrs/tools/runner/finances/bb_browser.rb +1 -1
- data/lib/ehbrs/tools/runner/fs/selected.rb +1 -1
- data/lib/ehbrs/tools/runner/music/lyrics.rb +69 -0
- data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +1 -1
- data/lib/ehbrs/tools/version.rb +1 -1
- data/vendor/aranha-parsers/aranha-parsers.gemspec +1 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/rspec/setup.rb +1 -1
- data/vendor/aranha-parsers/lib/aranha/parsers/rspec/{source_target_fixtures_example.rb → shared_examples/source_target_fixtures.rb} +0 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/fetch_content_error.rb +10 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +15 -2
- data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
- data/vendor/ehbrs_ruby_utils/ehbrs_ruby_utils.gemspec +3 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music.rb +9 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container.rb +31 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +1 -1
- data/vendor/ultimate_lyrics/Gemfile +5 -0
- data/vendor/ultimate_lyrics/bin/download_parser_spec_files.rb +94 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/field.rb +83 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/lyrics.rb +13 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/parser.rb +28 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/exclude_item.rb +17 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/extract_item.rb +21 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/item.rb +48 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/replace_fields.rb +13 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/rule.rb +52 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/url_format.rb +21 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider.rb +92 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider_search.rb +43 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/providers_data.xml +355 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata/field.rb +24 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata.rb +28 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/version.rb +5 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics.rb +7 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb +20 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.source.html +8 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.source.html +8 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.source.html +193 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.source.html +193 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.source.html +87 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.target.yaml +36 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.source.html +4 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.target.yaml +5 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.source.html +2 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.source.html +2 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.source.html +101 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.source.html +29 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.source.html +29 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.source.html +1298 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/provider_search_spec.rb +72 -0
- data/vendor/ultimate_lyrics/spec/rubocop_spec.rb +3 -0
- data/vendor/ultimate_lyrics/spec/spec_helper.rb +4 -0
- data/vendor/ultimate_lyrics/ultimate_lyrics.gemspec +19 -0
- metadata +75 -6
@@ -0,0 +1,355 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!--
|
3
|
+
Copy of https://raw.githubusercontent.com/clementine-player/Clementine/fb93ae4b020014ae38e7ebf51f3d8e333a5b572f/data/lyrics/ultimate_providers.xml.
|
4
|
+
-->
|
5
|
+
<lyricproviders>
|
6
|
+
<provider name="azlyrics.com" title="{artist} LYRICS - {title}" charset="utf-8"
|
7
|
+
url="http://www.azlyrics.com/lyrics/{artist}/{title}.html">
|
8
|
+
<urlFormat replace="._@,;&\/()'"-" with="" />
|
9
|
+
<extract>
|
10
|
+
<item begin="<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->"
|
11
|
+
end="</div>" />
|
12
|
+
</extract>
|
13
|
+
<exclude>
|
14
|
+
<item tag="<B>" />
|
15
|
+
<item begin="<i>[" end="]</i>" />
|
16
|
+
<item begin="[" end="]" />
|
17
|
+
</exclude>
|
18
|
+
<invalidIndicator value="<h1>Welcome to AZLyrics!</h1>" />
|
19
|
+
</provider>
|
20
|
+
<provider name="bollywoodlyrics.com (Bollywood songs)"
|
21
|
+
title="{title} Song Lyrics - BollywoodLyrics.com" charset="utf-8"
|
22
|
+
url="http://www.bollywoodlyrics.com/lyric/{Title}">
|
23
|
+
<urlFormat replace="_@;\/"'()[]" with="-" />
|
24
|
+
<urlFormat replace="?" with="" />
|
25
|
+
<extract>
|
26
|
+
<item begin="<div class="entry-content">" end="</div>" />
|
27
|
+
</extract>
|
28
|
+
<invalidIndicator value="Couldn't find that page." />
|
29
|
+
</provider>
|
30
|
+
<provider name="darklyrics.com" title="{ARTIST} LYRICS - "{title}" ({year}) album"
|
31
|
+
charset="utf-8" url="http://www.darklyrics.com/lyrics/{artist2}/{album2}.html">
|
32
|
+
<extract>
|
33
|
+
<item begin="<h3><a name="{track}">{track}. {Title2}</a></h3><br />"
|
34
|
+
end="<h3>" />
|
35
|
+
</extract>
|
36
|
+
<extract>
|
37
|
+
<item begin="<h3><a name="{track}">{track}. {Title2}</a></h3><br />"
|
38
|
+
end="<div class="thanks">" />
|
39
|
+
</extract>
|
40
|
+
<invalidIndicator value="The page you requested was not found on DarkLyrics.com." />
|
41
|
+
</provider>
|
42
|
+
<provider name="directlyrics.com" title="{artist} - {title} lyrics" charset="iso-8859-1"
|
43
|
+
url="http://www.directlyrics.com/{artist}-{title}-lyrics.html">
|
44
|
+
<urlFormat replace="_@,;&\/'"" with="-" />
|
45
|
+
<urlFormat replace="." with="" />
|
46
|
+
<extract>
|
47
|
+
<item tag="<div id="lyricsContent">" />
|
48
|
+
<item tag="<p>" />
|
49
|
+
</extract>
|
50
|
+
<exclude>
|
51
|
+
<item begin="<b>" end="</b>" />
|
52
|
+
</exclude>
|
53
|
+
</provider>
|
54
|
+
<provider name="elyrics.net" title="{title} Lyrics - {artist}" charset="iso-8859-1"
|
55
|
+
url="http://www.elyrics.net/read/{a}/{artist}-lyrics/{title}-lyrics.html">
|
56
|
+
<urlFormat replace="_@;&\/"" with="-" />
|
57
|
+
<urlFormat replace="'" with="_" />
|
58
|
+
<extract>
|
59
|
+
<item tag="<div class='ly' style='font-size:12px;'>" />
|
60
|
+
</extract>
|
61
|
+
<exclude>
|
62
|
+
<item tag="<strong>" />
|
63
|
+
<item tag="<em>" />
|
64
|
+
</exclude>
|
65
|
+
<invalidIndicator value="Page not Found" />
|
66
|
+
</provider>
|
67
|
+
<provider name="Encyclopaedia Metallum" title="{title Lyrics - {artist}" charset="utf-8"
|
68
|
+
url="http://www.metal-archives.com/search/ajax-advanced/searching/songs/?songTitle={title}&bandName={artist}&ExactBandMatch=1">
|
69
|
+
|
70
|
+
<extract>
|
71
|
+
<item url="http://www.metal-archives.com/release/ajax-view-lyrics/id/{id}" />
|
72
|
+
<item begin="id=\"lyricsLink_" end=""" />
|
73
|
+
</extract>
|
74
|
+
<invalidIndicator value=""iTotalRecords": 0" />
|
75
|
+
<invalidIndicator value="lyrics not available" />
|
76
|
+
</provider>
|
77
|
+
<provider name="genius.com" charset="utf-8" url="https://www.genius.com/{artist}-{title}-lyrics">
|
78
|
+
<urlFormat replace=",._@!#%^*+;\/"'()[]" with="" />
|
79
|
+
<urlFormat replace=":" with="-" />
|
80
|
+
<!-- When $ is used as the dollar sign it is omitted from the url
|
81
|
+
When $ is used instead of 's',
|
82
|
+
in some cases it is replaced by 's'(Too $hort -> too-short)
|
83
|
+
in other cases it is omitted ($uicideboy$ -> uicideboy)
|
84
|
+
I chose to omit it though, in some cases it's gonna be problematic -->
|
85
|
+
<urlFormat replace="$" with="" />
|
86
|
+
<urlFormat replace="ÄÂÀÁÃäâàáã" with="a" />
|
87
|
+
<urlFormat replace="ËÊÈÉëêèé" with="e" />
|
88
|
+
<urlFormat replace="ÏÌïì" with="i" />
|
89
|
+
<urlFormat replace="ÖÔÒÓÕöôòóõ" with="o" />
|
90
|
+
<urlFormat replace="ÜŪÙÚüūùú" with="u" />
|
91
|
+
<urlFormat replace="ŸÝÿý" with="y" />
|
92
|
+
<urlFormat replace="Ññ" with="n" />
|
93
|
+
<urlFormat replace="Çç" with="c" />
|
94
|
+
<urlFormat replace="ß" with="ss" />
|
95
|
+
<urlFormat replace="&" with="and" />
|
96
|
+
<extract>
|
97
|
+
<item tag="<div class="lyrics">" />
|
98
|
+
</extract>
|
99
|
+
<exclude>
|
100
|
+
<item begin="<!--" end="-->" />
|
101
|
+
<item begin="<a href=" end=">" />
|
102
|
+
<item begin="</a" end=">" />
|
103
|
+
</exclude>
|
104
|
+
</provider>
|
105
|
+
<provider name="hindilyrics.net (Bollywood songs)" title="{title} ({album})" charset="utf-8"
|
106
|
+
url="http://www.hindilyrics.net/lyrics/of-{Title}.html">
|
107
|
+
<urlFormat replace="_@;\/"'()[]" with="%20" />
|
108
|
+
<urlFormat replace="?" with="" />
|
109
|
+
<extract>
|
110
|
+
<item begin="<div class=nm>Movie</div>:" end="</pre>" />
|
111
|
+
</extract>
|
112
|
+
<exclude>
|
113
|
+
<item begin="<span class=" end="">" />
|
114
|
+
</exclude>
|
115
|
+
<invalidIndicator value="Couldn't find that page." />
|
116
|
+
</provider>
|
117
|
+
<provider name="letras.mus.br" title="" charset="utf-8"
|
118
|
+
url="https://www.letras.mus.br/winamp.php?musica={title}&artista={artist}">
|
119
|
+
<urlFormat replace="_@,;&\/"" with="_" />
|
120
|
+
<urlFormat replace="" with="+" />
|
121
|
+
<extract>
|
122
|
+
<item begin="</div>" end="</div>" />
|
123
|
+
</extract>
|
124
|
+
<invalidIndicator value="Verifique se o nome do seu arquivo e sua" />
|
125
|
+
</provider>
|
126
|
+
<provider name="lololyrics.com" title="" charset="utf-8"
|
127
|
+
url="http://api.lololyrics.com/0.5/getLyric?artist={artist}&track={title}">
|
128
|
+
<urlFormat replace="_@,;&\/"#" with="_" />
|
129
|
+
<extract>
|
130
|
+
<item tag="<response>" />
|
131
|
+
</extract>
|
132
|
+
<invalidIndicator value="ERROR" />
|
133
|
+
</provider>
|
134
|
+
<provider name="loudson.gs" title="" charset="utf-8"
|
135
|
+
url="http://www.loudson.gs/{a}/{artist}/{album}/{title}">
|
136
|
+
<urlFormat replace="_@,;&\/"" with="-" />
|
137
|
+
<urlFormat replace="." with="" />
|
138
|
+
<extract>
|
139
|
+
<item tag="<div class="middle_col_TracksLyrics ">" />
|
140
|
+
</extract>
|
141
|
+
</provider>
|
142
|
+
<provider name="lyrics.com" title="{artist} - {title} Lyrics" charset="utf-8"
|
143
|
+
url="http://www.lyrics.com/lyrics/{artist}/{title}.html">
|
144
|
+
<urlFormat replace="_@,;&\/"" with="-" />
|
145
|
+
<urlFormat replace="'." with="" />
|
146
|
+
<extract>
|
147
|
+
<item tag="<div id="lyrics" class="SCREENONLY">" />
|
148
|
+
</extract>
|
149
|
+
<exclude>
|
150
|
+
<item begin="<br><br><a target='_blank'" end="></a>" />
|
151
|
+
</exclude>
|
152
|
+
<invalidIndicator value="Click to search for the Lyrics on Lyrics.com" />
|
153
|
+
<invalidIndicator value="we do not have the lyric for this song" />
|
154
|
+
</provider>
|
155
|
+
<provider name="lyrics.wikia.com" title="{artist}:{title} Lyrics - " charset="utf-8"
|
156
|
+
url="http://lyrics.wikia.com/{Artist}:{Title}">
|
157
|
+
<urlFormat replace="_@;\"" with="_" />
|
158
|
+
<urlFormat replace="?" with="%3F" />
|
159
|
+
<extract>
|
160
|
+
<item begin="<div class='lyricbox'>" end="<div class='lyricsbreak'" />
|
161
|
+
</extract>
|
162
|
+
<exclude>
|
163
|
+
<item tag="<div class='rtMatcher'>" />
|
164
|
+
<item tag="<span style="padding:1em">" />
|
165
|
+
</exclude>
|
166
|
+
</provider>
|
167
|
+
<provider name="lyricsbay.com" title="{title} lyrics {artist}" charset="iso-8859-1"
|
168
|
+
url="http://www.lyricsbay.com/{title}_lyrics-{artist}.html">
|
169
|
+
<urlFormat replace="_@,;&\/'"" with="_" />
|
170
|
+
<urlFormat replace="." with="" />
|
171
|
+
<extract>
|
172
|
+
<item tag="<div id=EchoTopic>" />
|
173
|
+
</extract>
|
174
|
+
<exclude>
|
175
|
+
<item tag="<textarea name="songscpy" id="songscpyid" onclick="callselect('songscpyid','selectswf')" rows="3" cols="45" READONLY>" />
|
176
|
+
</exclude>
|
177
|
+
</provider>
|
178
|
+
<provider name="lyricsdownload.com" title="{artist} - {title} LYRICS" charset="utf-8"
|
179
|
+
url="http://www.lyricsdownload.com/{artist}-{title}-lyrics.html">
|
180
|
+
<urlFormat replace="_@,;&\/"" with="-" />
|
181
|
+
<urlFormat replace="." with="" />
|
182
|
+
<extract>
|
183
|
+
<item tag="<div id="div_customCSS">" />
|
184
|
+
</extract>
|
185
|
+
<invalidIndicator value="We haven't lyrics of this song" />
|
186
|
+
</provider>
|
187
|
+
<provider name="lyricsmania.com" title="{artist} - {title} Lyrics" charset="iso-8859-1"
|
188
|
+
url="http://www.lyricsmania.com/{title}_lyrics_{artist}.html">
|
189
|
+
<urlFormat replace="_@;&\/"'." with="_" />
|
190
|
+
<extract>
|
191
|
+
<item begin="<span style="font-size:14px;">"
|
192
|
+
end="<span style="font-size:14px;">" />
|
193
|
+
<item begin="</center>" end="<a" />
|
194
|
+
</extract>
|
195
|
+
<invalidIndicator value="The lyrics you requested is not in our archive yet," />
|
196
|
+
</provider>
|
197
|
+
<provider name="lyricsmode.com" title="{artist} - {title} lyrics" charset="iso-8859-1"
|
198
|
+
url="http://www.lyricsmode.com/lyrics/{a}/{artist}/{title}.html">
|
199
|
+
<urlFormat replace="._@,;&\/"" with="_" />
|
200
|
+
<extract>
|
201
|
+
<item tag="<div id='songlyrics_h' class='dn'>" />
|
202
|
+
</extract>
|
203
|
+
<invalidIndicator value="Sorry, we have no" />
|
204
|
+
</provider>
|
205
|
+
<provider name="lyricsplugin.com" title="{artist} - {title} Lyrics" charset="utf-8"
|
206
|
+
url="http://www.lyricsplugin.com/winamp03/plugin/?title={title}&artist={artist}">
|
207
|
+
<urlFormat replace="_@;&\/"" with="-" />
|
208
|
+
<urlFormat replace="'" with="" />
|
209
|
+
<urlFormat replace="" with="%20" />
|
210
|
+
<extract>
|
211
|
+
<item tag="<div id="lyrics">" />
|
212
|
+
</extract>
|
213
|
+
</provider>
|
214
|
+
<provider name="lyricsreg.com" title="{title} lyrics {artist}" charset="iso-8859-1"
|
215
|
+
url="http://www.lyricsreg.com/lyrics/{artist}/{title}/">
|
216
|
+
<urlFormat replace="_@,;&\/"" with="+" />
|
217
|
+
<urlFormat replace="'." with="" />
|
218
|
+
<extract>
|
219
|
+
<item begin="Ringtone to your Cell" end="Ringtone to your Cell" />
|
220
|
+
<item begin="<div style="text-align:center;">" end="<a" />
|
221
|
+
</extract>
|
222
|
+
<invalidIndicator value="Page not Found" />
|
223
|
+
</provider>
|
224
|
+
<provider name="lyricstime.com" title="{artist} - {title} Lyrics" charset="iso-8859-1"
|
225
|
+
url="http://www.lyricstime.com/{artist}-{title}-lyrics.html">
|
226
|
+
<urlFormat replace="_@,;&\/"'" with="-" />
|
227
|
+
<urlFormat replace="." with="" />
|
228
|
+
<extract>
|
229
|
+
<item tag="<div id="songlyrics" >" />
|
230
|
+
<item tag="<p>" />
|
231
|
+
</extract>
|
232
|
+
</provider>
|
233
|
+
<provider name="lyriki.com" title="" charset="utf-8"
|
234
|
+
url="http://www.lyriki.com/{artist}:{title}">
|
235
|
+
<urlFormat replace="_@,;&\/"" with="_" />
|
236
|
+
<urlFormat replace="." with="" />
|
237
|
+
<extract>
|
238
|
+
<item begin="</table>" end="<div class="printfooter">" />
|
239
|
+
<item tag="<p>" />
|
240
|
+
</extract>
|
241
|
+
</provider>
|
242
|
+
<provider name="metrolyrics.com" title="{artist} - {title} LYRICS" charset="utf-8"
|
243
|
+
url="http://www.metrolyrics.com/{title}-lyrics-{artist}.html">
|
244
|
+
<urlFormat replace="_@,;&\/"" with="-" />
|
245
|
+
<urlFormat replace="'." with="" />
|
246
|
+
<extract>
|
247
|
+
<item tag="<span id="lyrics">" />
|
248
|
+
</extract>
|
249
|
+
<extract>
|
250
|
+
<item tag="<div id="lyrics">" />
|
251
|
+
</extract>
|
252
|
+
<exclude>
|
253
|
+
<item tag="<h5>" />
|
254
|
+
</exclude>
|
255
|
+
<invalidIndicator value="These lyrics are missing" />
|
256
|
+
</provider>
|
257
|
+
<provider name="mp3lyrics.org" title="{artist} &quot;{title}&quot; Lyrics"
|
258
|
+
charset="utf-8" url="http://www.mp3lyrics.org/{a}/{artist}/{title}/">
|
259
|
+
<urlFormat replace="_@,;&\/"" with="-" />
|
260
|
+
<urlFormat replace="'." with="" />
|
261
|
+
<extract>
|
262
|
+
<item tag="<span id=gn_lyricsB>" />
|
263
|
+
</extract>
|
264
|
+
<extract>
|
265
|
+
<item tag="<div class="KonaBody" id="EchoTopic">" />
|
266
|
+
</extract>
|
267
|
+
<exclude>
|
268
|
+
<item tag="<font size=2>" />
|
269
|
+
<item begin="<b><i>" end="</u></b>:" />
|
270
|
+
<item begin="<b>Lyrics" end="</b>" />
|
271
|
+
</exclude>
|
272
|
+
<invalidIndicator value="Something went wrong" />
|
273
|
+
</provider>
|
274
|
+
<provider name="musixmatch.com" title="{artist} - {title} lyrics | Musixmatch" charset="utf-8"
|
275
|
+
url="https://www.musixmatch.com/lyrics/{Artist}/{Title}">
|
276
|
+
<urlFormat replace="_@;\/"'()[]" with="-" />
|
277
|
+
<urlFormat replace="?" with="" />
|
278
|
+
<extract>
|
279
|
+
<item begin="<span id="lyrics-html"" end="</span>" />
|
280
|
+
</extract>
|
281
|
+
<exclude>
|
282
|
+
<item begin="data-reactid="" end="">" />
|
283
|
+
</exclude>
|
284
|
+
<invalidIndicator value="We couldn't find that page." />
|
285
|
+
</provider>
|
286
|
+
<provider name="seeklyrics.com" title="{artist} - {title} Lyrics" charset="iso-8859-1"
|
287
|
+
url="http://www.seeklyrics.com/lyrics/{Artist}/{Title}.html">
|
288
|
+
<urlFormat replace="_@,;&\/'"" with="-" />
|
289
|
+
<urlFormat replace="." with="" />
|
290
|
+
<extract>
|
291
|
+
<item tag="<div id="songlyrics">" />
|
292
|
+
</extract>
|
293
|
+
</provider>
|
294
|
+
<provider name="songlyrics.com" title="{title} LYRICS - {artist}" charset="utf-8"
|
295
|
+
url="http://www.songlyrics.com/{artist}/{title}-lyrics/">
|
296
|
+
<urlFormat replace="._@,;&\/"" with="-" />
|
297
|
+
<urlFormat replace="'" with="_" />
|
298
|
+
<extract>
|
299
|
+
<item tag="<p id="songLyricsDiv" ondragstart="return false;" onselectstart="return false;" oncontextmenu="return false;" class="songLyricsV14" style="font-size: 14px;z-index: 9999;position: absolute;left: -6000px;">" />
|
300
|
+
</extract>
|
301
|
+
<exclude>
|
302
|
+
<item begin="[" end="]" />
|
303
|
+
</exclude>
|
304
|
+
<invalidIndicator value="Sorry, we have no" />
|
305
|
+
<invalidIndicator value="This is an upcoming album and we do not have the" />
|
306
|
+
</provider>
|
307
|
+
<provider name="tekstowo.pl (Original lyric language)" title="{artist} - {title} - tekst"
|
308
|
+
charset="utf-8" url="http://www.tekstowo.pl/piosenka,{artist},{title}.html">
|
309
|
+
<urlFormat replace="_@,;&\/'"." with="_" />
|
310
|
+
<extract>
|
311
|
+
<item begin="<div class="song-text">"
|
312
|
+
end="<a href="javascript:;"" />
|
313
|
+
</extract>
|
314
|
+
<extract>
|
315
|
+
<item tag="<div class="tlumaczenie">" />
|
316
|
+
</extract>
|
317
|
+
<exclude>
|
318
|
+
<item begin="<h2>" end="</h2><br />" />
|
319
|
+
</exclude>
|
320
|
+
</provider>
|
321
|
+
<provider name="tekstowo.pl (Translated to Polish)" title="{artist} - {title} - tekst"
|
322
|
+
charset="utf-8" url="http://www.tekstowo.pl/piosenka,{artist},{title}.html">
|
323
|
+
<urlFormat replace="_@,;&\/'"." with="_" />
|
324
|
+
<extract>
|
325
|
+
<item begin="<div id="translation" class=" end="<a href=" />
|
326
|
+
</extract>
|
327
|
+
<exclude>
|
328
|
+
<item begin=""id-" end="">" />
|
329
|
+
</exclude>
|
330
|
+
</provider>
|
331
|
+
<provider name="teksty.org" title="{artist} - {title} - tekst" charset="utf-8"
|
332
|
+
url="http://teksty.org/{artist},{title},tekst-piosenki">
|
333
|
+
<urlFormat replace="_@,;&\/"'" with="-" />
|
334
|
+
<urlFormat replace="." with="" />
|
335
|
+
<extract>
|
336
|
+
<item begin="<div class="songText" id="songContent">"
|
337
|
+
end="</div>" />
|
338
|
+
</extract>
|
339
|
+
</provider>
|
340
|
+
<provider name="vagalume.com.br" title="{title} de {artist} no VAGALUME" charset="iso-8859-1"
|
341
|
+
url="http://vagalume.com.br/{artist}/{title}.html">
|
342
|
+
<urlFormat replace="_@,;&\/'"." with="-" />
|
343
|
+
<extract>
|
344
|
+
<item tag="<span class="editable_area">" />
|
345
|
+
</extract>
|
346
|
+
</provider>
|
347
|
+
<provider name="vagalume.com.br (Portuguese translations)"
|
348
|
+
title="{title} de {artist} no VAGALUME" charset="iso-8859-1"
|
349
|
+
url="http://vagalume.com.br/{artist}/{title}-traducao.html">
|
350
|
+
<urlFormat replace="_@,;&\/'"." with="-" />
|
351
|
+
<extract>
|
352
|
+
<item tag="<div class="tab_traducao sideBySide lyricArea tab_tra_pt">" />
|
353
|
+
</extract>
|
354
|
+
</provider>
|
355
|
+
</lyricproviders>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UltimateLyrics
|
4
|
+
class SongMetadata
|
5
|
+
class Field
|
6
|
+
enable_listable
|
7
|
+
lists.add_symbol :sources, :album, :artist, :title, :track, :year
|
8
|
+
|
9
|
+
common_constructor :song_metadata, :field
|
10
|
+
|
11
|
+
def apply(string)
|
12
|
+
field.apply(string, value)
|
13
|
+
end
|
14
|
+
|
15
|
+
def value
|
16
|
+
field.value(song_metadata.send(field.source_attribute))
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_s
|
20
|
+
"[#{song_metadata} | #{field}]"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module UltimateLyrics
|
6
|
+
class SongMetadata
|
7
|
+
require_sub __FILE__
|
8
|
+
common_constructor :data do
|
9
|
+
self.data = ::UltimateLyrics::SongMetadata::Field.lists.sources.hash_keys_validate!(data)
|
10
|
+
end
|
11
|
+
|
12
|
+
::UltimateLyrics::SongMetadata::Field.lists.sources.each_value do |field|
|
13
|
+
define_method field do
|
14
|
+
data.fetch(field)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# @param field [UltimateLyrics::Field]
|
19
|
+
# @return [UltimateLyrics::SongMetadata::Field]
|
20
|
+
def field(field)
|
21
|
+
UltimateLyrics::SongMetadata::Field.new(self, field)
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_s
|
25
|
+
data.map { |k, v| "#{k}=#{v}" }.join(', ')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ultimate_lyrics/parser'
|
4
|
+
require 'ultimate_lyrics/provider'
|
5
|
+
|
6
|
+
::RSpec.describe ::UltimateLyrics::Parser do
|
7
|
+
include_examples 'source_target_fixtures', __FILE__
|
8
|
+
|
9
|
+
def source_data(source_file)
|
10
|
+
parser = described_class.new(
|
11
|
+
provider_by_basename(::File.basename(source_file)),
|
12
|
+
::File.read(source_file)
|
13
|
+
)
|
14
|
+
{ url: parser.url?, result: parser.result }
|
15
|
+
end
|
16
|
+
|
17
|
+
def provider_by_basename(basename)
|
18
|
+
::UltimateLyrics::Provider.by_identifier(basename.split('__').first)
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
http://www.metal-archives.com/search/ajax-advanced/searching/songs/?songTitle=thriller&bandName=michael jackson&ExactBandMatch=1
|
@@ -0,0 +1 @@
|
|
1
|
+
http://www.metal-archives.com/search/ajax-advanced/searching/songs/?songTitle=rouxinol&bandName=milton nascimento&ExactBandMatch=1
|