hongkong-news-scrapers 0.5.0 → 0.5.1

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: e238333e49b8d54ace5988eaaddac722470ae09d
4
- data.tar.gz: 97f7163b2d30d66925d90a0439c63cf84f0c5cf7
3
+ metadata.gz: 248d543a55f475735122fefcd5df444cf4e94f8c
4
+ data.tar.gz: d7c76c87d95dbeb0f6f2b5634a1249e3cddd6d7e
5
5
  SHA512:
6
- metadata.gz: 66d4f59b6d0c0f65577dc151295c4f5344021dd0c81946f4eaac13303be687b1970a9f3db41525dffbc68890f420dcee96f7c120e6002c5c6f2ecfb4e4de2a53
7
- data.tar.gz: 886080e21e00a473c437059c8346a66dda82b24241c62c8ce624157a0fa44054881a19d4d36060cf18bea05f36b8b51c1a2a6006310c09253cb516febafa650b
6
+ metadata.gz: 46cda9198ea0af131ca463f8c3fc15992ebf2eac821c0ec408779c4418007d7805ad41a5686e2e9e569af43166df9804eb52f9fc65c386cb5e46595fe3bb25ff
7
+ data.tar.gz: ed2bbba7b69c0315dbe629c22fd2c2b2820be8affe60e04761505a93e3d5ec2a3f23b1a6b15f4653d73775f05797e66342186281595e652f110e0b255fbad29e
@@ -14,7 +14,7 @@ module Hongkong
14
14
  def news_links
15
15
  visit "http://hk.apple.nextmedia.com/"
16
16
 
17
- links = all("#article_ddl option").collect do |option|
17
+ links = doc.css("#article_ddl option").collect do |option|
18
18
  link = Link.new
19
19
  link.title = option.text
20
20
  link.url = option["value"]
@@ -17,7 +17,7 @@ module Hongkong
17
17
  def news_links
18
18
  visit LIST_URL
19
19
 
20
- links = all(".listing ul li a").collect do |anchor|
20
+ links = doc.css(".listing ul li a").collect do |anchor|
21
21
  link = Link.new
22
22
  link.title = anchor.text
23
23
  link.url = URI::join(LIST_URL, anchor["href"]).to_s
@@ -35,7 +35,7 @@ module Hongkong
35
35
 
36
36
  document = Document.new
37
37
  document.source = name
38
- document.title = doc.search("h1").text
38
+ document.title = doc.css("h1").text
39
39
  document.url = url
40
40
  document.html = html
41
41
  document.content = page.evaluate_script("HongKongNews.getInnerText('article')")
@@ -17,7 +17,7 @@ module Hongkong
17
17
  def news_links
18
18
  visit LIST_URL
19
19
 
20
- links = all("#articleListSELECT option").collect do |option|
20
+ links = doc.css("#articleListSELECT option").collect do |option|
21
21
  link = Link.new
22
22
  link.title = option.text
23
23
  link.url = URI::join(LIST_URL, option["value"]).to_s
@@ -35,7 +35,7 @@ module Hongkong
35
35
 
36
36
  document = Document.new
37
37
  document.source = name
38
- document.title = doc.search("h1").text
38
+ document.title = doc.css("h1").text
39
39
  document.url = url
40
40
  document.html = html
41
41
  document.content = page.evaluate_script("HongKongNews.getInnerText('#contentCTN-top')") + "\n" + page.evaluate_script("HongKongNews.getInnerText('#contentCTN-right')")
@@ -1,7 +1,7 @@
1
1
  module Hongkong
2
2
  module News
3
3
  module Scrapers
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hongkong-news-scrapers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Chong
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-25 00:00:00.000000000 Z
11
+ date: 2015-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler