Is it possible to get the request referrer from the response object in parse function?
10x
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
HTTP
Refererfield is set up by HTTP client in request headers, not in response headers, as this header tells server where did client come from to current page.It would be rather weird to receive http
Refererheader in response.But when talking about
scrapy, there’s a reference toRequestobject on which theResponsewas generated, in response’srequestfield, so the next call result:can contain
Refererheader if it was set when making request.