Below is the spider code:
import scrapy
class MyntraSpider(scrapy.Spider):
custom_settings = {
'HTTPCACHE_ENABLED': False,
'dont_redirect': True,
#'handle_httpstatus_list' : [302,307],
#'CRAWLERA_ENABLED': False,
'USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36',
}
name = "heytest"
allowed_domains = ["www.myntra.com"]
start_urls = ["https://www.myntra.com/web/v2/search/data/duke"]
def parse(self, response):
self.logger.debug('Parsed jabong.com')
"Parsed jabong.com" is not getting logged. Actually, callback method(parse) is not getting called. Kindly revert.
Please find Error logs from scraping hub:
See also Postman screenshot
I run this code (only few times) and I have no problem to get data.
It looks similar to your code so I don't know why you have problem.
Maybe they block you for some reason.