vk_music 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vk_music/client.rb +5 -2
- data/lib/vk_music/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c51759b83b9c94ae99db4f957e80f9d7e071d998e171813dd33ccb1883d8d5c
|
4
|
+
data.tar.gz: abd153ed90bc234046c4e38f41870fb66bc38ae390d7755cadce110b54c384bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5476442c461a25f5753cc707238ba01ee9d0cd1a180be23d8d5f7d3f46439a61bfc05106c15396745a62f2a5c8da6590c1c03f83cc0f86f5d10e95026a02505
|
7
|
+
data.tar.gz: 8aade904f7fe57f4c073686a9aa15173083b6ed86ec30863723573fab391daacc2a6288cb3c47fdb253d806fa3607a5c3c0ee37c152b8a38df158c2145d6ebd2
|
data/lib/vk_music/client.rb
CHANGED
@@ -419,7 +419,10 @@ module VkMusic
|
|
419
419
|
def audios_from_page(obj)
|
420
420
|
page = obj.is_a?(Mechanize::Page) ? obj : load_page(obj)
|
421
421
|
begin
|
422
|
-
page.css(".audio_item.ai_has_btn").map
|
422
|
+
page.css(".audio_item.ai_has_btn").map do |elem|
|
423
|
+
data = JSON.parse(elem.attribute("data-audio"))
|
424
|
+
Audio.from_data(data, @id)
|
425
|
+
end
|
423
426
|
rescue
|
424
427
|
raise Exceptions::ParseError
|
425
428
|
end
|
@@ -534,7 +537,7 @@ module VkMusic
|
|
534
537
|
def playlist_urls_from_page(obj)
|
535
538
|
page = obj.is_a?(Mechanize::Page) ? obj : load_page(obj)
|
536
539
|
begin
|
537
|
-
page.css(".
|
540
|
+
page.css(".AudioBlock_music_playlists .AudioPlaylistSlider .al_playlist").map { |elem| elem.attribute("href").to_s }
|
538
541
|
rescue
|
539
542
|
raise Exceptions::ParseError
|
540
543
|
end
|
data/lib/vk_music/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vk_music
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fizvlad
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
|
-
rubygems_version: 3.0.
|
189
|
+
rubygems_version: 3.1.0.pre2
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: Provides interface to work with VK music via HTTP requests
|