bots 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/scraper.rb +2 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d048bca926b971212391dd9405a1d82d1f3afa563afcbe0db65af2c754b42df
4
- data.tar.gz: 2eb8ecbc2e1cec7d69039a640104209df71e1c7882ec32cfd8304048e10a0126
3
+ metadata.gz: 3a8018e0d8575a415699c41dcba236e3c4f400e8132111093e421ac02e792548
4
+ data.tar.gz: 4b876044081e94743d1b719c53424331d44bb200a8bdcfddd7d78562209eeed3
5
5
  SHA512:
6
- metadata.gz: aefad15e842214027526baf6aeff07c584e064fbd40f8c31e9a71c875ea24acc179cd36c6f963839e4cfef0bd9ef775332db439f3e9b8a336b1235ee81c5a6fc
7
- data.tar.gz: 07461d5bb58adc219acfad52232d9199a8944b797c5176e63eb90316060aaa05e215ba27d1c86c659fcf92f6a3204407b71274d69e3361ef9655ea0989fe6592
6
+ metadata.gz: 326e82a582132f2d267e906df73aad0d812f9fc4fe00c8af2ba9ef6cd93a174ae2004719ec76f5cc6b018da0eda1b2cd891dd51f7df7adaad6044da773f207ec
7
+ data.tar.gz: 2a4944c21854faee39f81b81004fb63baf3f270b2374f081b98ca25b4f7695af80184b1449dff38207d4c21b7f34b524d59c997931f2db2743df42c56a714875
data/lib/scraper.rb CHANGED
@@ -61,6 +61,8 @@ module BlackStack
61
61
  page = self.get(url)
62
62
  # get the self.links to the pages of the website
63
63
  aux = page.links.map(&:href)
64
+ # remove non-string elements
65
+ aux = aux.select { |link| link.is_a?(String) }
64
66
  # remove # from the self.links
65
67
  aux = aux.map { |link| !link.nil? && link.split('#').first }
66
68
  # remove querystring from the self.links
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bots
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-15 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_cloud_logging