Sha256: 0c4f24e5434c56cceecc379ab62437e9268ab2e343e2ac5e44a73ffabc2e6406

Contents?: true

Size: 651 Bytes

Versions: 9

Compression:

Stored size: 651 Bytes

Contents

# 查询
module HttpCrawler
  module Proxy
    module Laofu
      module Response
        module TestProxyApi
          def parsing
            array = []
            decoding_body.scan(/([^\n\r:]*):([^\n\r]*)/) do |v1, v2|
              if v1 =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
                array[array.length] = {"p_addr" => v1, "p_port" => v2, "p_user" => nil, "p_pass" => nil}
              else
                Rails.logger.warn decoding_body
              end
            end
            array
          end
        end # module GetProxy
      end # module Response
    end # module Laofu
  end # module Proxy
end # module HttpCrawler


Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
http_crawler-0.2.2.8 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.2.7 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.2.6 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.2.5 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.2.4 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.2.3 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.2.1 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.2 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb
http_crawler-0.2.1 lib/http_crawler/proxy/test_proxy_api/response/get_proxy.rb