relaton-itu 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/relaton_itu/scrapper.rb +2 -2
- data/lib/relaton_itu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfe1709e332d5eede7b7d5ebbabb8fba69e1ec084b5026ebebfc0061b7a34cb7
|
4
|
+
data.tar.gz: ec4fc6615f5695867b84ca8f749b8f7fe10da481f4ff6e216b655312c8baf3da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 637549a3b6bab17d347fc476834f4a4a721186c4f59887de211e2d503c9312fe79983f3bf896b74a2b59f1a2cfab2d1f4dc021287f4555850c8c2e560395fe26
|
7
|
+
data.tar.gz: 0ec6ef4818bb2a2d82607ab07a1616f8c0597cec8ce2a2fa185439a586445902505581c418bb663b3c85446b0a6b62d593a91c7ce2a9d84dc62820c2df88577e
|
data/Gemfile.lock
CHANGED
data/lib/relaton_itu/scrapper.rb
CHANGED
@@ -115,8 +115,8 @@ module RelatonItu
|
|
115
115
|
def get_page(url)
|
116
116
|
uri = URI url
|
117
117
|
resp = Net::HTTP.get_response(uri) # .encode("UTF-8")
|
118
|
-
|
119
|
-
uri = URI resp["location"]
|
118
|
+
until resp.code == "200"
|
119
|
+
uri = URI resp["location"] if resp.code =~ /^30/
|
120
120
|
resp = Net::HTTP.get_response(uri) # .encode("UTF-8")
|
121
121
|
end
|
122
122
|
[uri.to_s, Nokogiri::HTML(resp.body)]
|
data/lib/relaton_itu/version.rb
CHANGED