I was trying to scrape Bing news. When I access health news directly I get health news specific for U.S. visitors. When I access it in localhost using Goutte it gives results specific to India (which is my location) . Is there some way to get U.S. specific news while scraping?
I have set the user agent to make sure it is not a problem:
$client = new Client();
$client->setHeader('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36');
I can't think of any other difference that can cause this issue.
You didn't provide details so I might be wrong maybe you just need to send cookies with your request . First check your browser cookies and see if the values are affecting on the website if the cookies is the issue you can use this code (if you are using curl) :