http_crawler 0.3.1.8 → 0.3.1.9
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/http_crawler/client.rb +1 -1
- data/lib/http_crawler/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: a6d058015235d3581684580abd54bcbdeb4aa78045415be483ee9dc0b2795344
|
|
4
|
+
data.tar.gz: 28ca84c57926fcabb0be5da1bb775a7abab1e4414d1302e1b2c58bd434f5cdde
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d10759c7d4837a454de0d324ebb81966fda915ccef6945b6fa6060d805a3a8a97271581c5a5aa059a6fa4bb0cbef68fa79b55cc783144c06765e1ce48a58ad98
|
|
7
|
+
data.tar.gz: db5f132ca9005e4c11f522b429be6b9019b5c5f1fb0fed17b99c56428cb7a03a1e358a7a7bf91e53b999dc74376cab152920439a0814ae2da7d6394284e3d47e
|
data/lib/http_crawler/client.rb
CHANGED
|
@@ -184,7 +184,6 @@ module HttpCrawler
|
|
|
184
184
|
sleep(5)
|
|
185
185
|
end while true
|
|
186
186
|
proxy_ip = proxy_ip.symbolize_keys
|
|
187
|
-
Rails.logger.debug("当前IP => #{@proxy},获取最新代理 => #{proxy_ip}")
|
|
188
187
|
|
|
189
188
|
unless proxy_ip[:p_addr] && proxy_ip[:p_port]
|
|
190
189
|
Rails.logger.warn "无最新代理等待5秒后重新获取:p_addr 或 p_port 为空"
|
|
@@ -192,6 +191,7 @@ module HttpCrawler
|
|
|
192
191
|
proxy_ip = get_proxy
|
|
193
192
|
end
|
|
194
193
|
|
|
194
|
+
Rails.logger.info("当前IP => #{@proxy},切换至代理 => #{proxy_ip}")
|
|
195
195
|
proxy_ip
|
|
196
196
|
end
|
|
197
197
|
|
data/lib/http_crawler/version.rb
CHANGED