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 +4 -4
- data/lib/email_crawler/mechanize_helper.rb +9 -1
- data/lib/email_crawler/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: 8fe6913140fc9048bb7fdfc21f6e4b5557953cf0
|
4
|
+
data.tar.gz: 3092d7b6880ed7e813cbbf4a34cf809e66847dea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|