Skip to content

Commit 413a56a

Browse files
committed
mention SCRAPY_SETTINGS_MODULE env var
1 parent f1e8bd5 commit 413a56a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/02_guides/05_scrapy.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ The Apify SDK provides an Apify-Scrapy integration. The main challenge of this i
2525

2626
In this setup, `apify.scrapy.initialize_logging` configures an Apify log formatter and reconfigures loggers to ensure consistent logging across Scrapy, the Apify SDK, and other libraries. The `apify.scrapy.run_scrapy_actor` bridges asyncio coroutines with Twisted's reactor, enabling the Actor's main coroutine, which contains the Scrapy spider, to be executed.
2727

28+
Make sure the `SCRAPY_SETTINGS_MODULE` environment variable is set to the path of the Scrapy settings module. This variable is also used by the `Actor` class to detect that the project is a Scrapy project, triggering additional actions.
29+
2830
<CodeBlock className="language-python" title="main.py: The Actor main coroutine">
2931
{MainExample}
3032
</CodeBlock>

0 commit comments

Comments
 (0)