apify / actor-templates

This project is the :house: home of Apify actor template projects to help users quickly get started.
https://apify.com/
25 stars 15 forks source link

Feature: Add a Python + Scrapy template #128

Closed fnesveda closed 1 year ago

fnesveda commented 1 year ago

This adds a Python + Scrapy template.

It uses the default Scrapy project structure, and is based on an example straight from Scrapy: https://github.com/scrapy/quotesbot

It's runnable both as an actor, and also directly via Scrapy: scrapy crawl quotes -a tag=humor -o quotes.json

The Scrapy project can actually remain completely untouched, we can just add a few files around it to make it into an actor.

Once we agree on the code I'd probably publish it as an example actor too.

BTW, figuring out the logging setup was a pain in the ass.

Also, the Scrapy example is published with the MIT license, we should include it somewhere here in the repo, to be completely correct.