Skip to content

Commit ed2ca00

Browse files
committed
Document how to use the splash spider attribute
1 parent 367add4 commit ed2ca00

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,18 @@ Alternatively, you can use regular scrapy.Request and
162162
}
163163
})
164164

165+
It is also possible to configure Splash for all requests in a Spider by default
166+
using a ``splash`` spider attribute::
167+
168+
class MySpider(Spider):
169+
name = 'myspider'
170+
splash = {
171+
# …
172+
}
173+
174+
If you use a ``splash`` spider attribute, you can still override those Splash
175+
settings for specific requests using the ``splash`` request meta key.
176+
165177
Use ``request.meta['splash']`` API in middlewares or when scrapy.Request
166178
subclasses are used (there is also ``SplashFormRequest`` described below).
167179
For example, ``meta['splash']`` allows to create a middleware which enables

0 commit comments

Comments
 (0)