bandcamp-discover 0.1.2 → 0.1.4

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: 5d50793b35b553e8aac70ef8e4b21b4dbc07c2d41fbdbd543bfa72425273d210
4
- data.tar.gz: 8272231e6424c8026a2b763ad006062f3d536cb98de8e169c715ec75c7d1ebab
3
+ metadata.gz: 750f0d5e7d5fff281ec73e8620512ca7dee29260773cb9b213853207beea9a2d
4
+ data.tar.gz: 89c86fc2f6787e90b05aa7fb15c897b5e89b00521f6169d1bee14260325e7ac9
5
5
  SHA512:
6
- metadata.gz: 0f2db21408876b6807043fb317c841eac38bcec328d73f661fd50c5d2989aadd7374c9c190840b3929cae58dc1756a9981f32fd822a86a9314f7a8b97bc7fbdb
7
- data.tar.gz: 994b55ce629f2fbba10ad1bfc3d150d6ac2293335272a24f6b67310e28c3466501d6233645e198d89c1af87a8b3427dd2d8dc79d5a49209d9b3dbdbe549c04e8
6
+ metadata.gz: 2d02ff64ee70fa7310b0695ffd9db11986255bc17b09b3647471105762275db6cf598fbd0295ad07dc2e920c75c4f5975a819374dc1fb5552dd1f539740a5c1b
7
+ data.tar.gz: 10683d784402bd528c56e1ece11d9f077f134b8843d51f89f476e1efef28704be3b1231b19954b91a6ee4fb625ff1a1f5915a7c703032c077645b260218b2d59
@@ -4,7 +4,7 @@ require_relative "./music"
4
4
  module BandcampDiscover
5
5
  module Scrapers
6
6
  class Label < Base
7
- def scrape
7
+ def scrape(force: false)
8
8
  super do |page|
9
9
  puts "starting to scrape #{@url}"
10
10
  page.goto(@url)
@@ -15,13 +15,19 @@ module BandcampDiscover
15
15
  name = band_name_location_container.query_selector(".title").inner_text
16
16
  location = band_name_location_container.query_selector(".location").inner_text
17
17
 
18
- if bio_text&.inner_html =~ /label|platform/
18
+ if force || bio_text&.inner_html =~ /label|platform/i
19
19
  return Sync do
20
20
  music_tags = Scrapers::Music.new(url: "#{@url}/music", browser: @browser, max_tasks: @max_tasks).scrape
21
21
 
22
22
  puts "done scraping #{@url}"
23
23
 
24
- [@url, name, location, music_tags&.compact]
24
+ {
25
+ url: @url,
26
+ name: name,
27
+ location: location,
28
+ bio: bio_text.inner_html,
29
+ tags_with_weights: music_tags&.compact
30
+ }
25
31
  end
26
32
  else
27
33
  puts "not a label: #{@url}"
@@ -1,3 +1,3 @@
1
1
  module BandcampDiscover
2
- VERSION = '0.1.2'
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bandcamp-discover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian RUbisch
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-21 00:00:00.000000000 Z
10
+ date: 2025-02-28 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake