ultimate_lyrics 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89bd643d6ab8349fa05307fb67db9c2fe330b771282e4bd23586aac836629f6d
4
- data.tar.gz: dc8686e9cc8301598e2013cd437f99a06013bef7efb914a6ba1fa70bc5f9bd3f
3
+ metadata.gz: c42fb57f470acdff1dd4678a29800fbbcfac00cea6bfa0f911f5cafe6b4064d1
4
+ data.tar.gz: f31ec4c761a9e453bafbcad96c8a2a88f874d519c1fa3280a18c92d78439a0d5
5
5
  SHA512:
6
- metadata.gz: 5ac22ebb8b47785d6813fc04b8a5aaa92facc90e9e06bef71ccc3c5f54a91858e73c104b979c14c2b4b346534c0cf8cb24d50cb941e8304846776483b3e54546
7
- data.tar.gz: 1b3640182a9f266091be5d67457a7dc9c82b8110ff23b168a4fe20b8fa0e6b254a47070c411e788d49366f7411f24eb3c725d71a778644c7dec3d59f037861c4
6
+ metadata.gz: '068174430fa9b79423c4b0e6c3c980227e68f060a68d47b50a501ff1bbe6c2651dced1e0c3fdd02afb7ddda11a8441b68b174e017f3240405e617f635b0d59c5'
7
+ data.tar.gz: 9150058f969f50324e7dd27f5c332446491f1a682b8012d24a38165f90c92ff09f44793c78776163945e4cb07994e4be3d3e5132cdf7469e45bfc5728fdd077d
@@ -36,6 +36,10 @@ module UltimateLyrics
36
36
 
37
37
  common_constructor :node
38
38
 
39
+ def encoding
40
+ node.attribute('charset').text
41
+ end
42
+
39
43
  def extract_rules
40
44
  node.xpath('./extract').map do |v|
41
45
  ::UltimateLyrics::Provider::Rule.new(v)
@@ -26,7 +26,7 @@ module UltimateLyrics
26
26
 
27
27
  # @return [UltimateLyrics::Parser]
28
28
  def lyrics_original_text
29
- ::Aranha::Parsers::SourceAddress.detect_sub(url).content
29
+ ::Aranha::Parsers::SourceAddress.detect_sub(url).content.force_encoding(provider.encoding)
30
30
  rescue ::Aranha::Parsers::SourceAddress::FetchContentError
31
31
  nil
32
32
  end
@@ -147,7 +147,8 @@ Copy of https://raw.githubusercontent.com/clementine-player/Clementine/fb93ae4b0
147
147
  <item tag="&lt;div id=&quot;lyrics&quot; class=&quot;SCREENONLY&quot;&gt;" />
148
148
  </extract>
149
149
  <exclude>
150
- <item begin="&lt;br&gt;&lt;br&gt;&lt;a target='_blank'" end="&gt;&lt;/a&gt;" />
150
+ <item begin="&lt;br&gt;" end="&lt;br&gt;" />
151
+ <item begin="&lt;a target='_blank'" end="&gt;&lt;/a&gt;" />
151
152
  </exclude>
152
153
  <invalidIndicator value="Click to search for the Lyrics on Lyrics.com" />
153
154
  <invalidIndicator value="we do not have the lyric for this song" />
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UltimateLyrics
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultimate_lyrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-22 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers