dimanche 16 février 2020

How to scrap Amazon without 503 using Ruby?

First of all, I'm working with ruby for past 1week(only) I was trying to scrape Amazon for learning purpose

when I wrote this with Nokogiri gem code

    page = Nokogiri::HTML(open("https://www.amazon.com/"))

    puts page

this piece of code returns

.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/open-uri.rb:358:in `open_http': 503 Service Unavailable (OpenURI::HTTPError)

In python, we can bypass it with Proxy but in ruby! I don't have an idea?, I'm finding an exception handling results which is not going to help out for getting information out of the site basically

And as we all know the site is protected, advice like buying API key is also not expected, I need some help to crack it with ruby not even with ROR, thanks in advance!

Aucun commentaire:

Enregistrer un commentaire