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

Document how to use scrapy-splash within the Scrapy shell #244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,36 @@ the boilerplate.
Getting help
============

* see the **Frequently Asked Questions (FAQ)** section below
* for problems with rendering pages read "`Splash FAQ`_" page
* for Scrapy-related bugs take a look at "`reporting Scrapy bugs`_" page

Best approach to get any other help is to ask a question on `Stack Overflow`_

.. _reporting Scrapy bugs: https://doc.scrapy.org/en/master/contributing.html#reporting-bugs
.. _Splash FAQ: http://splash.readthedocs.io/en/stable/faq.html#website-is-not-rendered-correctly
.. _Stack Overflow: https://stackoverflow.com/questions/tagged/scrapy-splash?sort=frequent&pageSize=15&mixed=1
.. _Stack Overflow: https://stackoverflow.com/questions/tagged/scrapy-splash?sort=frequent


Frequently Asked Questions (FAQ)
================================

How to use scrapy-splash from the Scrapy shell?
-----------------------------------------------

After you run ``scrapy shell`` without arguments inside a Scrapy project
configured to use scrapy-splash, you can create a
``scrapy_splash.SplashRequest`` object and call ``fetch`` to load it into the
shell::

$ scrapy shell
>>> from scrapy_splash import SplashRequest
>>> request = SplashRequest('https://example.com')
>>> fetch(request)

Alternatively, you may `use the Splash HTTP API
<https://stackoverflow.com/a/35359507>`_.


Contributing
Expand Down