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

Expose current crawler in the scrapy shell. #557

Merged
merged 4 commits into from Jan 28, 2014

Conversation

@rmax
Copy link
Contributor

@rmax rmax commented Jan 23, 2014

Currently the way to access the crawler in the shell is by import the object from the module scrapy.project. But, that module is currently deprecated as stated in the same module.

This pull request expose the current crawler object in the shell making it easily accessible which is very useful to interact with middlewares, extensions and other classes that requires the crawler object.

@dangra
Copy link
Member

@dangra dangra commented Jan 23, 2014

LGTM

@kmike
Copy link
Member

@kmike kmike commented Jan 23, 2014

I think docs for Scrapy shell should be updated with this change - there is a listing of all objects available. See http://doc.scrapy.org/en/latest/topics/shell.html#available-scrapy-objects and example shell output later.

…ell output.

Also updated the shell example with a reproducible code example.
@rmax
Copy link
Contributor Author

@rmax rmax commented Jan 23, 2014

Updated shell output in the docs.

Actually I went through the shell session examples and fixed the output with the latest output. Maybe a bit beyond the scope of this PR but also I improved the shell inspect example with a reproducible example code.

pablohoffman added a commit that referenced this pull request Jan 28, 2014
Expose current crawler in the scrapy shell.
@pablohoffman pablohoffman merged commit 116a1df into scrapy:master Jan 28, 2014
1 check passed
1 check passed
default The Travis CI build passed
Details
@pablohoffman
Copy link
Member

@pablohoffman pablohoffman commented Jan 28, 2014

Thanks @darkrho for the proactive fixes, that doc does tend to get outdated easily!

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

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.