fly_parser 0.0.15 → 0.0.16
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.
- checksums.yaml +4 -4
- data/lib/fly_parser/sources/news-nl.rb +6 -2
- data/lib/fly_parser/sources/news.rb +6 -1
- data/lib/fly_parser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9312ff4784b36131a15c744433e5e4a641560010
|
|
4
|
+
data.tar.gz: 2868d0ace5a0b9586621495d61e752b88fb684c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b700c4636d2b4bf1d716df629edd80cb5a11d3d1f91637dcf6ee7a010937e6be0dc9cb794db99874c5021ab1d4b27c4ba8614c96815e082b294fdfe2313a737c
|
|
7
|
+
data.tar.gz: db2bf586408997b0e0dedf262386d5e16659177eafa473cf4d48a609265cde92da63464043535cf20ee7dbb7301628f3f615075671c5312f248b47bddaed756a
|
|
@@ -13,8 +13,12 @@ module Parser
|
|
|
13
13
|
title = item.xpath('title/text()').text()
|
|
14
14
|
date = item.xpath('pubDate').first.content()
|
|
15
15
|
link = item.xpath('link/text()').text()
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
begin
|
|
17
|
+
page = Nokogiri::HTML(open(link))
|
|
18
|
+
rescue Exception => e
|
|
19
|
+
puts e.message
|
|
20
|
+
next
|
|
21
|
+
end
|
|
18
22
|
next if page.search('.article_block img.media-full').first.nil?
|
|
19
23
|
poster_image = page.search('.article_block img.media-full').first.attributes['src'].value
|
|
20
24
|
full_desc = item.xpath('description/text()')
|
|
@@ -13,7 +13,12 @@ module Parser
|
|
|
13
13
|
title = item.xpath('title/text()').text()
|
|
14
14
|
date = item.xpath('pubDate').first.content()
|
|
15
15
|
link = item.xpath('link/text()').text()
|
|
16
|
-
|
|
16
|
+
begin
|
|
17
|
+
page = Nokogiri::HTML(open(link))
|
|
18
|
+
rescue Exception => e
|
|
19
|
+
puts e.message
|
|
20
|
+
next
|
|
21
|
+
end
|
|
17
22
|
next if page.search('.article_illustration img').first.nil?
|
|
18
23
|
poster_image = page.search('.article_illustration img').first.attributes['src'].value
|
|
19
24
|
short_desc = page.search('.article_lead').first().content()
|
data/lib/fly_parser/version.rb
CHANGED