apify / apify-sdk-python

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.
https://docs.apify.com/sdk/python
Apache License 2.0
117 stars 11 forks source link

Fix conversion of `headers` fields in Apify <--> Scrapy request translation #182

Closed vdusek closed 8 months ago

vdusek commented 8 months ago

Problem description

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.

Issue