generalscraper 0.0.1 → 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generalscraper.rb +5 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e568d1e9d1c0fa9c98f814128439bd009194c0d
4
- data.tar.gz: f26d58116e50b61ad308eed4df0ce03e76cbfba8
3
+ metadata.gz: ef817246382783da5c99aaf13b1d1a03ebc87ce6
4
+ data.tar.gz: 9c41b5cf1c937e4ce9826ba7bd619e380277d309
5
5
  SHA512:
6
- metadata.gz: 92120914fbe80f8a0b5b3b5b996753b07a218745a88d7cd201fb533fa3de4e116499c1cc2d218d030771bf3d25dbf42743efc83ed7f1d2e4cb44939229ec31a6
7
- data.tar.gz: b7d4070620f7a43ff7008ae414ea3aed53da287c697f32cb80f6afbd66186d94151a7393ac9547428f9ddeabf37e3500e7e55165ad11f7d2e1f994975e539f96
6
+ metadata.gz: 73967c97043bbd9c79849b036285cf41a187f654a456f53d56b1ecea95042f2db0020eecba0a48366390b6d08f28ae95c8c179815608def58691e38520363a55
7
+ data.tar.gz: 2d9a966ecc6a6389a730044fd7c94c6a9588fdaa8297d8bea11ac048c30321c8e9b7c76fca0c4bb56e1e1408669e8a27c628e367c8c236dc06ebb3a85470071f
@@ -4,11 +4,12 @@ require 'nokogiri'
4
4
  require 'open-uri'
5
5
 
6
6
  class GeneralScraper
7
- def initialize(scrapesite, input)
7
+ def initialize(scrapesite, input, table)
8
8
  @input = input
9
9
  @scrapesite = scrapesite
10
10
  @output = Array.new
11
11
  @startindex = 10
12
+ @table = table
12
13
  end
13
14
 
14
15
  # Searches for links on Google
@@ -62,7 +63,9 @@ class GeneralScraper
62
63
  pagehash[m['name']] = m['content']
63
64
  end
64
65
  end
65
- pagehash[:page] = html.css("body").text
66
+ if @table == false
67
+ pagehash[:page] = html.css("body").text
68
+ end
66
69
  @output.push(pagehash)
67
70
  rescue
68
71
  puts "URL: " + url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: generalscraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. C. McGrath