There is a webpage that my browser can access, but urllib2.urlopen() (Python) and wget both return HTTP 403 (Forbidden). Is there a way to figure out what happened?
I am using the most primitive form, like urllib2.urlopen("http://test.com/test.php"), using the same url (http://test.com/test.php) for both the browser and wget. I have cleared all my cookies in browser before the test.
Thanks a lot!
Some sites dont allow web scraping. Try using Python requests.
This library should work.