zeitungen 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zeitungen/index_page.rb +7 -0
- data/lib/zeitungen/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: c5817f46c0fb7798fe02b6934e70a72eb44b7cb3
|
4
|
+
data.tar.gz: 1ba6d9a7181bff0a10eb5b135fe0c667f4271205
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e3da7decd74642dec39ecfc9fde9f7669c742d537f621ac489cbd3130759e79d9cc87ef901b536833de773b02c37bcc256403645b59290520919ee5e45e472
|
7
|
+
data.tar.gz: d552f7abc888b103cac30588adb29b077c5a13d71bc9b376ae97f947f5045239d74216a7b51bd7309b05dc9d149428ce2a8bbe53fd299484085644ec5e11e499
|
data/lib/zeitungen/index_page.rb
CHANGED
@@ -35,6 +35,13 @@ module Zeitungen
|
|
35
35
|
all_quotidie_links = page.links.find_all { |link| link.attributes.parent.parent.path == "/html/body/section/section/div/article[#{a}]/div/section[1]/div/div" }
|
36
36
|
break if all_quotidie_links.size > 3
|
37
37
|
end
|
38
|
+
|
39
|
+
if all_quotidie_links.size==0
|
40
|
+
[0,1,2,3].each do |a|
|
41
|
+
all_quotidie_links = page.links.find_all { |link| link.attributes.parent.parent.path == "/html/body/section/section/div/div/article[#{a}]/div/section[1]/div/div" }
|
42
|
+
break if all_quotidie_links.size > 3
|
43
|
+
end
|
44
|
+
end
|
38
45
|
end
|
39
46
|
puts "Parsing zeitungen page takes #{Time.now-t}s"
|
40
47
|
all_quotidie_links
|
data/lib/zeitungen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeitungen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iwan Buetti
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|