Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Proxy generator to replace gimmeproxy.com #2

Open
howdoicomputer opened this issue Feb 7, 2017 · 1 comment
Open

Proxy generator to replace gimmeproxy.com #2

howdoicomputer opened this issue Feb 7, 2017 · 1 comment

Comments

@howdoicomputer
Copy link
Collaborator

howdoicomputer commented Feb 7, 2017

As of right now, proxies are generated by making API calls to gimmeproxy as evidenced by this code here:

  def generate_proxy
    proxy_api_response = Mechanize.new.get(
      "http://gimmeproxy.com/api/getProxy?api_key=#{ENV['FINDAHOME_GIMMEPROXY_KEY']}?protocol=http"
    ).content

    proxy = JSON.parse(proxy_api_response)

    { ip: proxy['ip'], port: proxy['port'] }
  end

It's really simple code that just hits their API and returns a random, verified proxy's address and port. This works pretty dang well but the API service costs $15 a month - I don't want to spend $15 month on this.

To get an understanding of the problem, I highly suggesting reading the three blog posts published by gimmeproxy's founder http://256cats.com/gimmeproxy-source-part1/

So, there are a few alternatives to using gimmeproxy:

  1. Don't crawl at all and become an officially endorsed platform by the City of San Jose (lol).
  2. Have something similar to a cron job setup that runs https://github.com/chill117/proxy-lists and https://github.com/256cats/check-proxy and then persists what those two produce to either a file or a database and then have Ruby consume that data.
  3. Write a Ruby version of check-proxy and proxy-lists and use that.

I think I like solution two the best as it's the least amount of work that solves the problem. However, it'll add additional management complexity to the application.

@howdoicomputer
Copy link
Collaborator Author

I'm willing to eat the costs on this for three months.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants