tomslee / airbnb-data-collection

Data collection for Airbnb listings.
MIT License
478 stars 183 forks source link

To China user, site will redirect zh.airbnb.com, this's solution #6

Closed lovaxi closed 6 years ago

lovaxi commented 8 years ago

For china user, you need add some code to set locale to en, avoid auto redirect.

    # Now make the request
    cookies = dict(sticky_locale='en')
    response = requests.get(url, params, timeout=timeout,
                            headers=headers, cookies=cookies)
lovaxi commented 8 years ago

Otherwise, you will get bedrooms is null

stevenyesz commented 7 years ago

how about this issue?

tomslee commented 7 years ago

I had missed this. I've made the change but would like to run it for a few days to check that it makes no difference to other searches. I'll update this issue on the weekend.