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
115 stars 11 forks source link

Update of Scrapy integration, fixing dw middlewares #186

Closed vdusek closed 6 months ago

vdusek commented 6 months ago

Issue

Description

Testing

from scrapy import Spider as BaseSpider
from scrapy.http import Response

class TitleSpider(BaseSpider):
    name = 'title'
    start_urls = ['https://httpbin.org/redirect-to?url=https%3A%2F%2Fhonzajavorek.cz%2F']

    def parse(self, response: Response) -> dict[str, str]:
        return {'url': response.url}