The Apify SDK for Python is the official library for creating Apify Actors in Python. It provides useful features like actor lifecycle management, local storage emulation, and actor event handling.
Scrapy uses its own data structure for headers (scrapy.http.Headers). We need to convert it to the dictionary in to_apify_request to be able to serialize it. Then in the to_scrapy_request we need to convert it back to the scrapy.http.Headers.
Problem description
Scrapy uses its own data structure for headers (
scrapy.http.Headers
). We need to convert it to the dictionary into_apify_request
to be able to serialize it. Then in theto_scrapy_request
we need to convert it back to thescrapy.http.Headers
.Issue