scrapers 0.4.1 → 0.4.2

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
  SHA1:
3
- metadata.gz: 47a429a3788b477f98c69e351270ad1d646f16a5
4
- data.tar.gz: 7865bb977849512dc8424d97174fc291f1a612c2
3
+ metadata.gz: 6fb804c177c8883db20c25ec49ec1bb6cf54572b
4
+ data.tar.gz: c6c2c87ea1f501ace31a0b2e66a90ff57ba9708e
5
5
  SHA512:
6
- metadata.gz: feb38335c04e29f20812ad37324768a754cf2e3127d1fc1d876fe982921e27bc41632970e856d6ca21d907fb5c3849743e418d597dbaf1b700d2fdccd7a3d58d
7
- data.tar.gz: 7725f5ce736bed7b8f289b43361c794cb8a27bab41d85b6bc7e03a43b54e40a6cd04675bf604a590d6bf93cc28b60b62c51f7351520a5c7e3833d3aefae23bd5
6
+ metadata.gz: 9a1fcb7886a93bc4cd7f881367d3cfbe3f74771f69b58ae9cf0c74bb29ff0d9db31986e177ebaa04b852c9bf949fe1b55ab3ce4e9e9f7f51eefe62aa91d713a0
7
+ data.tar.gz: 053b85c2d9a801e27d5d12fe2a81ead56c9e77c54ae9064ed4db1792d29e9e936dc2edee936cb97aba6e1f2a025b536ba0e6345836f80e123d8453fa83066d20
@@ -1,5 +1,5 @@
1
1
  module Scrapers
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  DESCRIPTION = "A library of web site scrapers utilizing mechanize and other goodies. Helpful in gathering images, moving things, saving things, etc."
4
4
  SUMMARY = "Web site scrapers"
5
5
  LICENSE = "MIT"
data/lib/scrapers/xkcd.rb CHANGED
@@ -30,8 +30,8 @@ module Scrapers
30
30
  doc = Nokogiri::HTML(open(url.to_s))
31
31
  comic = doc.at_css("#comic img")
32
32
  results[:img_src] = comic.attr("src")
33
- results[:hover_text] = comic.attr("title")
34
- results[:title] = comic.attr("alt")
33
+ results[:img_title] = comic.attr("title")
34
+ results[:title] = results[:img_alt] = comic.attr("alt")
35
35
  results[:pubdate] = get_pubdate(results[:img_src])
36
36
 
37
37
  results
@@ -11,8 +11,9 @@ describe Scrapers::Xkcd do
11
11
  :title => "Sandwich",
12
12
  :url => "http://xkcd.com/149/",
13
13
  :img_src => "http://imgs.xkcd.com/comics/sandwich.png",
14
- :hover_text => "Proper User Policy apparently means Simon Says.",
15
- :pubdate => "2010-02-01"
14
+ :img_title => "Proper User Policy apparently means Simon Says.",
15
+ :img_alt => "Sandwich",
16
+ :pubdate => "2010-02-01",
16
17
  }
17
18
  end
18
19
  it "should retrieve the comic" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrapers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tamara Temple