Airbnb scraping with nokogiri

1

I'm doing a small project and I need to get information from the Airbnb page (specifically this url " link "). The problem occurs in the second line of code:

url = "https://www.airbnb.cl/s/Santiago--Chile?s_tag=EXop_G3D"
html = open(url)

Return me:

OpenURI::HTTPError: 503 Service Unavailable

With other sites I do not get this error, so I do not understand why this gives me back that.

    
asked by Nitroceluloso 02.04.2016 в 04:04
source

1 answer

1

This is because the url on which you want to scrapping actually responds with the error 503

This is probably because this request is of the POST type and not GET, which is what the line does

html = open(url)
    
answered by 11.05.2016 в 15:10