email_crawler 0.0.11 → 0.0.12

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: c1d4c2e2b7fa2781a050534296a5de7783100c3a
4
- data.tar.gz: 5fd71c35a51c903284312217e1195e807f1e2d40
3
+ metadata.gz: 8fe6913140fc9048bb7fdfc21f6e4b5557953cf0
4
+ data.tar.gz: 3092d7b6880ed7e813cbbf4a34cf809e66847dea
5
5
  SHA512:
6
- metadata.gz: 2ac69d6d4042db503c947b303e0b1cb28ea3421e0c11879f18652d734f865adee341dcc3cfae2bc98ff7f46c8e7389c55c5b6884aa6690e63c2b1163c69c50c3
7
- data.tar.gz: ce1d9e1f24b7488aac88f68fa75003d28065cd5c12917435c7221cb2901d6b99507613eb473f719929f314a4e9c5b8ace850fef3fb19f1fa58619f99721741e0
6
+ metadata.gz: f64caaf2f11217c196a806fc8014e03ca82900b2aa352e2aa5076ff5348a9444c6fecf265e97fb39cf9f5d9132aed0f89b78dbd2245ce3dea8380d14c7eec14d
7
+ data.tar.gz: e16e7746cbe5ce00d53826b09b3e67506ecbb8252add8c1f81aadf111263c63741ab3e63b8d76186ef67a89318679e8c8fb0077964e3cf2de8fa882899f15ab7
@@ -13,10 +13,18 @@ module EmailCrawler
13
13
  end
14
14
 
15
15
  def get(url)
16
+ retried = false
17
+
16
18
  begin
17
19
  page = agent.get(url)
18
20
  page if page.is_a?(Mechanize::Page)
19
- rescue Mechanize::Error, Net::OpenTimeout; end
21
+ rescue Mechanize::Error;
22
+ rescue SocketError, Net::OpenTimeout
23
+ unless retried
24
+ retried = true
25
+ retry
26
+ end
27
+ end
20
28
  end
21
29
  end
22
30
  end
@@ -1,3 +1,3 @@
1
1
  module EmailCrawler
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_crawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristian Rasch