lib/http_crawler/client.rb in http_crawler-0.3.0.4 vs lib/http_crawler/client.rb in http_crawler-0.3.0.5
- old
+ new
@@ -172,12 +172,18 @@
proxy_ip = get_proxy
end
proxy_ip
end
+ attr_accessor :error_urls
+
+ def error_urls
+ @error_urls ||= []
+ end
+
# 添加错误的url地址,表示这里面的url都是异常地址,存的是正则
def add_error_url(url_string)
- @http.error_urls << url_string
+ self.error_urls << url_string
end
# 初始化init_client参数
def init_client