Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Documentation Fixing Issue #6057 #6080

Closed
wants to merge 2 commits into from

Conversation

nila-2003
Copy link

This PR updates the documentation for spider.from_crawler() initialization and engine_started signal handler.

The change was adding the code snippet and comments on initialization and using the engine_started handler for fully initialized spiders.

Fixes #6057

image

@wRAR wRAR changed the base branch from 2.11 to master October 1, 2023 18:06
When you create a spider using the :meth:`Spider.from_crawler()`
class method, it's important to note that the spider doesn't have all
its components fully initialized at that point. Some components, such
as the downloader middleware, are not yet set up.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is incorrect.

To work with a fully initialized spider, consider using the
`engine_started` signal handler as described in :ref:`engine-started-
signal-handler`. This ensures that your spider has access to all its
components.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is also incorrect.

@wRAR
Copy link
Member

wRAR commented Oct 1, 2023

Also, everything is repeated twice and I don't think this code example is useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the docs about Crawler initialization changes
2 participants