Closed devfox-se closed 2 weeks ago
This is not a Scrapy issue, this is about a target website surprisingly accepting requests from Scrapy but not from a hard-coded web browser user agent string. You’ll have to either ask the website owners, or try to get help from the community, please do not open Scrapy issues to ask for help.
Hi I am facing this very strange problem.
I have setup a private squid proxy server that is accessible only from my IP and it works, I am able to browse the site that I try to scrape trough Firefox while having this proxy enabled.
Have only these anonymity settings enabled in my
squid.conf
fileBut when I use the same server in scrapy trough request
proxy
meta key the site just returns403 access denied
For my very surprise the requests started to work only after I disabled theUSER_AGENT
parameter in my scrapy settingsThis is the user agent I am using, its static and not intended to change/rotate
When I disable this parameter scrapy still uses the default user agent but for some reason I do not get 403 access denied error with it.
It is very confusing; can someone please help me to understand why does it fail with a valid user agent header?