hongkong-news-scrapers 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hongkong/news/models/document.rb +1 -1
- data/lib/hongkong/news/scrapers/apple_daily_scraper.rb +0 -5
- data/lib/hongkong/news/scrapers/mingpao_scraper.rb +0 -5
- data/lib/hongkong/news/scrapers/oriental_daily_scraper.rb +0 -6
- data/lib/hongkong/news/scrapers/version.rb +1 -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: e238333e49b8d54ace5988eaaddac722470ae09d
|
4
|
+
data.tar.gz: 97f7163b2d30d66925d90a0439c63cf84f0c5cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66d4f59b6d0c0f65577dc151295c4f5344021dd0c81946f4eaac13303be687b1970a9f3db41525dffbc68890f420dcee96f7c120e6002c5c6f2ecfb4e4de2a53
|
7
|
+
data.tar.gz: 886080e21e00a473c437059c8346a66dda82b24241c62c8ce624157a0fa44054881a19d4d36060cf18bea05f36b8b51c1a2a6006310c09253cb516febafa650b
|
@@ -20,8 +20,6 @@ module Hongkong
|
|
20
20
|
link.url = option["value"]
|
21
21
|
link
|
22
22
|
end.reject { |l| l.url.nil? }
|
23
|
-
|
24
|
-
cleanup
|
25
23
|
links
|
26
24
|
end
|
27
25
|
|
@@ -35,10 +33,7 @@ module Hongkong
|
|
35
33
|
document.url = url
|
36
34
|
document.html = html
|
37
35
|
document.content = page.evaluate_script("HongKongNews.getInnerText('#masterContent')")
|
38
|
-
document.screenshot_data = screenshot_data
|
39
36
|
document.image_url = doc.search("//meta[@property='og:image']/@content").first.text rescue nil
|
40
|
-
|
41
|
-
cleanup
|
42
37
|
document
|
43
38
|
end
|
44
39
|
end
|
@@ -23,8 +23,6 @@ module Hongkong
|
|
23
23
|
link.url = URI::join(LIST_URL, anchor["href"]).to_s
|
24
24
|
link
|
25
25
|
end
|
26
|
-
|
27
|
-
cleanup
|
28
26
|
links
|
29
27
|
end
|
30
28
|
|
@@ -41,10 +39,7 @@ module Hongkong
|
|
41
39
|
document.url = url
|
42
40
|
document.html = html
|
43
41
|
document.content = page.evaluate_script("HongKongNews.getInnerText('article')")
|
44
|
-
document.screenshot_data = screenshot_data
|
45
42
|
document.image_url = doc.search("//meta[@property='og:image']/@content").first.text rescue nil
|
46
|
-
|
47
|
-
cleanup
|
48
43
|
document
|
49
44
|
end
|
50
45
|
end
|
@@ -23,8 +23,6 @@ module Hongkong
|
|
23
23
|
link.url = URI::join(LIST_URL, option["value"]).to_s
|
24
24
|
link
|
25
25
|
end.reject { |l| l.url.to_s.end_with?("#") }
|
26
|
-
|
27
|
-
cleanup
|
28
26
|
links
|
29
27
|
end
|
30
28
|
|
@@ -41,12 +39,8 @@ module Hongkong
|
|
41
39
|
document.url = url
|
42
40
|
document.html = html
|
43
41
|
document.content = page.evaluate_script("HongKongNews.getInnerText('#contentCTN-top')") + "\n" + page.evaluate_script("HongKongNews.getInnerText('#contentCTN-right')")
|
44
|
-
document.screenshot_data = screenshot_data
|
45
|
-
|
46
42
|
image = doc.search("#contentCTN .photo img").first
|
47
43
|
document.image_url = URI::join(url, image["src"]).to_s if image
|
48
|
-
|
49
|
-
cleanup
|
50
44
|
document
|
51
45
|
end
|
52
46
|
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.
|
4
|
+
version: 0.5.0
|
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-
|
11
|
+
date: 2015-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|