horsefield 0.4.65 → 0.4.66
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/horsefield/nokogiri.rb +4 -0
- data/lib/horsefield/version.rb +1 -1
- data/test/horsefield/test_scraper.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b39019389eda9ae2ba5a43e94d45f1167cb9f264
|
4
|
+
data.tar.gz: dee940c96213b9d9618d59d7df268aafe27e552b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67208edcfb3f1da904367db57707a656a1f1427e47b6e2ff23afd95180df6799ae6564c210117940f3002d6cb8abd8283480a7c41563b150370f14402224619c
|
7
|
+
data.tar.gz: e9bb0e15fee15461fd03b10b1ba182478eb60e127a0d59f534ecb2d243aa13a6ebeb8ffc0c17b463211cd267d3b9354b059028022e76ac065cc132721c9b5819
|
data/lib/horsefield/nokogiri.rb
CHANGED
data/lib/horsefield/version.rb
CHANGED
@@ -9,6 +9,7 @@ class RedditScraper
|
|
9
9
|
one :tagline, 'p.tagline' do
|
10
10
|
one :submitted, './time/@datetime'
|
11
11
|
one :subreddit, 'a.subreddit'
|
12
|
+
one? :missing, '.missing'
|
12
13
|
end
|
13
14
|
many :links, './/a[contains(@href, "reddit.com")]/@href'
|
14
15
|
end
|
@@ -23,6 +24,6 @@ class TestScraper < Minitest::Test
|
|
23
24
|
|
24
25
|
def test_scraper
|
25
26
|
reddit = RedditScraper.new(@html).scrape
|
26
|
-
p reddit
|
27
|
+
p reddit[:posts].first[:tagline]
|
27
28
|
end
|
28
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: horsefield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.66
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Strömberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|