I need to set the referer url, before scraping a site, the site uses refering url based Authentication, so it does not allow me to login if the referer is not valid.
Override BaseSpider.start_requests and create there your custom Request passing it your referer header.
referer