I am scraping a site with Scrapy but some of it's API's are not returning JSON data without the 'if-none-match' header.
I have greater than 100 API's list so I want to generate automatic headers for getting a valid JSON file. anybody knows how to handle this or there is any other method to get rid of it.
Thanks in advance.
You can use the
DEFAULT_REQUEST_HEADERS
setting if you want to define headers for all requests:or the
headers
parameter for individuals requests: