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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e95f75b40e89ac4f7d51056b3412f343e171a92431ebab522a998120df7f2d8
4
- data.tar.gz: 03613c0cd92fd68728c25f04442c8d8f7c24276b52c7e2af4c4c448a319c9c10
3
+ metadata.gz: 2c51759b83b9c94ae99db4f957e80f9d7e071d998e171813dd33ccb1883d8d5c
4
+ data.tar.gz: abd153ed90bc234046c4e38f41870fb66bc38ae390d7755cadce110b54c384bc
5
5
  SHA512:
6
- metadata.gz: c32a1cabae2d9307e074132ccc69edf174df097d5fbf4c9a2fc596f33ca58f1cbbf49dab2c9ddbf21200e9f76326ab7926c1c68fc8b0dc81837c9faf1e9273f4
7
- data.tar.gz: b836b42444769bde9ea746aafa62300800d0d4c5e673b8c6ce6c4ff060ce20d152a8fd6b18189d1c63dce3d0203def9aab42d20fc2c4db181489906f8dcced01
6
+ metadata.gz: f5476442c461a25f5753cc707238ba01ee9d0cd1a180be23d8d5f7d3f46439a61bfc05106c15396745a62f2a5c8da6590c1c03f83cc0f86f5d10e95026a02505
7
+ data.tar.gz: 8aade904f7fe57f4c073686a9aa15173083b6ed86ec30863723573fab391daacc2a6288cb3c47fdb253d806fa3607a5c3c0ee37c152b8a38df158c2145d6ebd2
@@ -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 { |elem| Audio.from_node(elem, @id) }
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(".AudioShowcase__block_playlists .AudioPlaylistSlider .al_playlist").map { |elem| elem.attribute("href").to_s }
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
@@ -1,5 +1,5 @@
1
1
  module VkMusic
2
2
  ##
3
3
  # Library version.
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
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.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: 2019-12-29 00:00:00.000000000 Z
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.4
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