Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Move scrapy/contrib remaining top-level files to scrapy/extensions

Julia Medina9a3e3ba50536
diff --git a/docs/topics/downloader-middleware.rst b/docs/topics/downloader-middleware.rst
index bb969eca3..5cb6c9824 100644
--- a/docs/topics/downloader-middleware.rst
+++ b/docs/topics/downloader-middleware.rst
@@ -349,7 +349,7 @@ when an Internet connection is not available. The goal is to be able to
In order to use this policy, set:
-* :setting:`HTTPCACHE_POLICY` to ``scrapy.contrib.httpcache.DummyPolicy``
+* :setting:`HTTPCACHE_POLICY` to ``scrapy.extensions.httpcache.DummyPolicy``
.. _httpcache-policy-rfc2616:
@@ -383,7 +383,7 @@ what is missing:
In order to use this policy, set:
-* :setting:`HTTPCACHE_POLICY` to ``scrapy.contrib.httpcache.RFC2616Policy``
+* :setting:`HTTPCACHE_POLICY` to ``scrapy.extensions.httpcache.RFC2616Policy``
.. _httpcache-storage-fs:
@@ -395,7 +395,7 @@ File system storage backend is available for the HTTP cache middleware.
In order to use this storage backend, set:
-* :setting:`HTTPCACHE_STORAGE` to ``scrapy.contrib.httpcache.FilesystemCacheStorage``
+* :setting:`HTTPCACHE_STORAGE` to ``scrapy.extensions.httpcache.FilesystemCacheStorage``
Each request/response pair is stored in a different directory containing
the following files:
@@ -430,7 +430,7 @@ By default, it uses the anydbm_ module, but you can change it with the
In order to use this storage backend, set:
-* :setting:`HTTPCACHE_STORAGE` to ``scrapy.contrib.httpcache.DbmCacheStorage``
+* :setting:`HTTPCACHE_STORAGE` to ``scrapy.extensions.httpcache.DbmCacheStorage``
.. _httpcache-storage-leveldb:
@@ -447,7 +447,7 @@ the scrapy shell in parallel for the same spider.
In order to use this storage backend:
-* set :setting:`HTTPCACHE_STORAGE` to ``scrapy.contrib.httpcache.LeveldbCacheStorage``
+* set :setting:`HTTPCACHE_STORAGE` to ``scrapy.extensions.httpcache.LeveldbCacheStorage``
* install `LevelDB python bindings`_ like ``pip install leveldb``
.. _LevelDB: http://code.google.com/p/leveldb/
@@ -536,7 +536,7 @@ Don't cache responses with these URI schemes.
HTTPCACHE_STORAGE
^^^^^^^^^^^^^^^^^
-Default: ``'scrapy.contrib.httpcache.FilesystemCacheStorage'``
+Default: ``'scrapy.extensions.httpcache.FilesystemCacheStorage'``
The class which implements the cache storage backend.
@@ -559,7 +559,7 @@ HTTPCACHE_POLICY
.. versionadded:: 0.18
-Default: ``'scrapy.contrib.httpcache.DummyPolicy'``
+Default: ``'scrapy.extensions.httpcache.DummyPolicy'``
The class which implements the cache policy.
diff --git a/docs/topics/extensions.rst b/docs/topics/extensions.rst
index 19c296651..d5d985087 100644
--- a/docs/topics/extensions.rst
+++ b/docs/topics/extensions.rst
@@ -35,7 +35,7 @@ your Scrapy settings. In :setting:`EXTENSIONS`, each extension is represented
by a string: the full Python path to the extension's class name. For example::
EXTENSIONS = {
- 'scrapy.contrib.corestats.CoreStats': 500,
+ 'scrapy.extensions.corestats.CoreStats': 500,
'scrapy.telnet.TelnetConsole': 500,
}
@@ -69,7 +69,7 @@ included in the :setting:`EXTENSIONS_BASE` setting) you must set its order to
``None``. For example::
EXTENSIONS = {
- 'scrapy.contrib.corestats.CoreStats': None,
+ 'scrapy.extensions.corestats.CoreStats': None,
}
Writing your own extension
@@ -158,7 +158,7 @@ General purpose extensions
Log Stats extension
~~~~~~~~~~~~~~~~~~~
-.. module:: scrapy.contrib.logstats
+.. module:: scrapy.extensions.logstats
:synopsis: Basic stats logging
.. class:: LogStats
@@ -168,7 +168,7 @@ Log basic stats like crawled pages and scraped items.
Core Stats extension
~~~~~~~~~~~~~~~~~~~~
-.. module:: scrapy.contrib.corestats
+.. module:: scrapy.extensions.corestats
:synopsis: Core stats collection
.. class:: CoreStats
@@ -198,10 +198,10 @@ setting, and the server will listen in the port specified in
Memory usage extension
~~~~~~~~~~~~~~~~~~~~~~
-.. module:: scrapy.contrib.memusage
+.. module:: scrapy.extensions.memusage
:synopsis: Memory usage extension
-.. class:: scrapy.contrib.memusage.MemoryUsage
+.. class:: scrapy.extensions.memusage.MemoryUsage
.. note:: This extension does not work in Windows.
@@ -226,10 +226,10 @@ can be configured with the following settings:
Memory debugger extension
~~~~~~~~~~~~~~~~~~~~~~~~~
-.. module:: scrapy.contrib.memdebug
+.. module:: scrapy.extensions.memdebug
:synopsis: Memory debugger extension
-.. class:: scrapy.contrib.memdebug.MemoryDebugger
+.. class:: scrapy.extensions.memdebug.MemoryDebugger
An extension for debugging memory usage. It collects information about:
@@ -242,10 +242,10 @@ info will be stored in the stats.
Close spider extension
~~~~~~~~~~~~~~~~~~~~~~
-.. module:: scrapy.contrib.closespider
+.. module:: scrapy.extensions.closespider
:synopsis: Close spider extension
-.. class:: scrapy.contrib.closespider.CloseSpider
+.. class:: scrapy.extensions.closespider.CloseSpider
Closes a spider automatically when some conditions are met, using a specific
closing reason for each condition.
@@ -313,17 +313,17 @@ set), spiders won't be closed by number of errors.
StatsMailer extension
~~~~~~~~~~~~~~~~~~~~~
-.. module:: scrapy.contrib.statsmailer
+.. module:: scrapy.extensions.statsmailer
:synopsis: StatsMailer extension
-.. class:: scrapy.contrib.statsmailer.StatsMailer
+.. class:: scrapy.extensions.statsmailer.StatsMailer
This simple extension can be used to send a notification e-mail every time a
domain has finished scraping, including the Scrapy stats collected. The email
will be sent to all recipients specified in the :setting:`STATSMAILER_RCPTS`
setting.
-.. module:: scrapy.contrib.debug
+.. module:: scrapy.extensions.debug
:synopsis: Extensions for debugging Scrapy
Debugging extensions
@@ -332,7 +332,7 @@ Debugging extensions
Stack trace dump extension
~~~~~~~~~~~~~~~~~~~~~~~~~~
-.. class:: scrapy.contrib.debug.StackTraceDump
+.. class:: scrapy.extensions.debug.StackTraceDump
Dumps information about the running process when a `SIGQUIT`_ or `SIGUSR2`_
signal is received. The information dumped is the following:
@@ -361,7 +361,7 @@ There are at least two ways to send Scrapy the `SIGQUIT`_ signal:
Debugger extension
~~~~~~~~~~~~~~~~~~
-.. class:: scrapy.contrib.debug.Debugger
+.. class:: scrapy.extensions.debug.Debugger
Invokes a `Python debugger`_ inside a running Scrapy process when a `SIGUSR2`_
signal is received. After the debugger is exited, the Scrapy process continues
diff --git a/docs/topics/feed-exports.rst b/docs/topics/feed-exports.rst
index 27d601a19..faf9abc1c 100644
--- a/docs/topics/feed-exports.rst
+++ b/docs/topics/feed-exports.rst
@@ -209,7 +209,7 @@ These are the settings used for configuring the feed exports:
* :setting:`FEED_STORE_EMPTY`
* :setting:`FEED_EXPORT_FIELDS`
-.. currentmodule:: scrapy.contrib.feedexport
+.. currentmodule:: scrapy.extensions.feedexport
.. setting:: FEED_URI
@@ -272,11 +272,11 @@ FEED_STORAGES_BASE
Default::
{
- '': 'scrapy.contrib.feedexport.FileFeedStorage',
- 'file': 'scrapy.contrib.feedexport.FileFeedStorage',
- 'stdout': 'scrapy.contrib.feedexport.StdoutFeedStorage',
- 's3': 'scrapy.contrib.feedexport.S3FeedStorage',
- 'ftp': 'scrapy.contrib.feedexport.FTPFeedStorage',
+ '': 'scrapy.extensions.feedexport.FileFeedStorage',
+ 'file': 'scrapy.extensions.feedexport.FileFeedStorage',
+ 'stdout': 'scrapy.extensions.feedexport.StdoutFeedStorage',
+ 's3': 'scrapy.extensions.feedexport.S3FeedStorage',
+ 'ftp': 'scrapy.extensions.feedexport.FTPFeedStorage',
}
A dict containing the built-in feed storage backends supported by Scrapy.
diff --git a/docs/topics/settings.rst b/docs/topics/settings.rst
index a049f1438..f331b1dba 100644
--- a/docs/topics/settings.rst
+++ b/docs/topics/settings.rst
@@ -536,15 +536,15 @@ EXTENSIONS_BASE
Default::
{
- 'scrapy.contrib.corestats.CoreStats': 0,
+ 'scrapy.extensions.corestats.CoreStats': 0,
'scrapy.telnet.TelnetConsole': 0,
- 'scrapy.contrib.memusage.MemoryUsage': 0,
- 'scrapy.contrib.memdebug.MemoryDebugger': 0,
- 'scrapy.contrib.closespider.CloseSpider': 0,
- 'scrapy.contrib.feedexport.FeedExporter': 0,
- 'scrapy.contrib.logstats.LogStats': 0,
- 'scrapy.contrib.spiderstate.SpiderState': 0,
- 'scrapy.contrib.throttle.AutoThrottle': 0,
+ 'scrapy.extensions.memusage.MemoryUsage': 0,
+ 'scrapy.extensions.memdebug.MemoryDebugger': 0,
+ 'scrapy.extensions.closespider.CloseSpider': 0,
+ 'scrapy.extensions.feedexport.FeedExporter': 0,
+ 'scrapy.extensions.logstats.LogStats': 0,
+ 'scrapy.extensions.spiderstate.SpiderState': 0,
+ 'scrapy.extensions.throttle.AutoThrottle': 0,
}
The list of available extensions. Keep in mind that some of them need to
@@ -689,7 +689,7 @@ MEMUSAGE_ENABLED
Default: ``False``
-Scope: ``scrapy.contrib.memusage``
+Scope: ``scrapy.extensions.memusage``
Whether to enable the memory usage extension that will shutdown the Scrapy
process when it exceeds a memory limit, and also notify by email when that
@@ -704,7 +704,7 @@ MEMUSAGE_LIMIT_MB
Default: ``0``
-Scope: ``scrapy.contrib.memusage``
+Scope: ``scrapy.extensions.memusage``
The maximum amount of memory to allow (in megabytes) before shutting down
Scrapy (if MEMUSAGE_ENABLED is True). If zero, no check will be performed.
@@ -718,7 +718,7 @@ MEMUSAGE_NOTIFY_MAIL
Default: ``False``
-Scope: ``scrapy.contrib.memusage``
+Scope: ``scrapy.extensions.memusage``
A list of emails to notify if the memory limit has been reached.
@@ -735,7 +735,7 @@ MEMUSAGE_REPORT
Default: ``False``
-Scope: ``scrapy.contrib.memusage``
+Scope: ``scrapy.extensions.memusage``
Whether to send a memory usage report after each spider has been closed.
@@ -748,7 +748,7 @@ MEMUSAGE_WARNING_MB
Default: ``0``
-Scope: ``scrapy.contrib.memusage``
+Scope: ``scrapy.extensions.memusage``
The maximum amount of memory to allow (in megabytes) before sending a warning
email notifying about it. If zero, no warning will be produced.
@@ -961,7 +961,7 @@ STATSMAILER_RCPTS
Default: ``[]`` (empty list)
Send Scrapy stats after spiders finish scraping. See
-:class:`~scrapy.contrib.statsmailer.StatsMailer` for more info.
+:class:`~scrapy.extensions.statsmailer.StatsMailer` for more info.
.. setting:: TELNETCONSOLE_ENABLED
diff --git a/scrapy/downloadermiddlewares/httpcache.py b/scrapy/downloadermiddlewares/httpcache.py
index 7b4b53f7c..bd112c48d 100644
--- a/scrapy/downloadermiddlewares/httpcache.py
+++ b/scrapy/downloadermiddlewares/httpcache.py
@@ -90,16 +90,3 @@ class HttpCacheMiddleware(object):
self.storage.store_response(spider, request, response)
else:
self.stats.inc_value('httpcache/uncacheable', spider=spider)
-
-
-from scrapy.contrib.httpcache import FilesystemCacheStorage as _FilesystemCacheStorage
-class FilesystemCacheStorage(_FilesystemCacheStorage):
-
- def __init__(self, *args, **kwargs):
- import warnings
- from scrapy.exceptions import ScrapyDeprecationWarning
- warnings.warn('Importing FilesystemCacheStorage from '
- 'scrapy.contrib.downloadermiddlware.httpcache is '
- 'deprecated, use scrapy.contrib.httpcache instead.',
- category=ScrapyDeprecationWarning, stacklevel=1)
- super(FilesystemCacheStorage, self).__init__(*args, **kwargs)
diff --git a/scrapy/extensions/__init__.py b/scrapy/extensions/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/scrapy/contrib/closespider.py b/scrapy/extensions/closespider.py
similarity index 100%
rename from scrapy/contrib/closespider.py
rename to scrapy/extensions/closespider.py
diff --git a/scrapy/contrib/corestats.py b/scrapy/extensions/corestats.py
similarity index 100%
rename from scrapy/contrib/corestats.py
rename to scrapy/extensions/corestats.py
diff --git a/scrapy/contrib/debug.py b/scrapy/extensions/debug.py
similarity index 100%
rename from scrapy/contrib/debug.py
rename to scrapy/extensions/debug.py
diff --git a/scrapy/contrib/feedexport.py b/scrapy/extensions/feedexport.py
similarity index 100%
rename from scrapy/contrib/feedexport.py
rename to scrapy/extensions/feedexport.py
diff --git a/scrapy/contrib/httpcache.py b/scrapy/extensions/httpcache.py
similarity index 100%
rename from scrapy/contrib/httpcache.py
rename to scrapy/extensions/httpcache.py
diff --git a/scrapy/contrib/logstats.py b/scrapy/extensions/logstats.py
similarity index 100%
rename from scrapy/contrib/logstats.py
rename to scrapy/extensions/logstats.py
diff --git a/scrapy/contrib/memdebug.py b/scrapy/extensions/memdebug.py
similarity index 100%
rename from scrapy/contrib/memdebug.py
rename to scrapy/extensions/memdebug.py
diff --git a/scrapy/contrib/memusage.py b/scrapy/extensions/memusage.py
similarity index 100%
rename from scrapy/contrib/memusage.py
rename to scrapy/extensions/memusage.py
diff --git a/scrapy/contrib/spiderstate.py b/scrapy/extensions/spiderstate.py
similarity index 100%
rename from scrapy/contrib/spiderstate.py
rename to scrapy/extensions/spiderstate.py
diff --git a/scrapy/contrib/statsmailer.py b/scrapy/extensions/statsmailer.py
similarity index 100%
rename from scrapy/contrib/statsmailer.py
rename to scrapy/extensions/statsmailer.py
diff --git a/scrapy/contrib/throttle.py b/scrapy/extensions/throttle.py
similarity index 100%
rename from scrapy/contrib/throttle.py
rename to scrapy/extensions/throttle.py
diff --git a/scrapy/settings/default_settings.py b/scrapy/settings/default_settings.py
index a7fe36648..9debaabc3 100644
--- a/scrapy/settings/default_settings.py
+++ b/scrapy/settings/default_settings.py
@@ -113,15 +113,15 @@ except KeyError:
EXTENSIONS = {}
EXTENSIONS_BASE = {
- 'scrapy.contrib.corestats.CoreStats': 0,
+ 'scrapy.extensions.corestats.CoreStats': 0,
'scrapy.telnet.TelnetConsole': 0,
- 'scrapy.contrib.memusage.MemoryUsage': 0,
- 'scrapy.contrib.memdebug.MemoryDebugger': 0,
- 'scrapy.contrib.closespider.CloseSpider': 0,
- 'scrapy.contrib.feedexport.FeedExporter': 0,
- 'scrapy.contrib.logstats.LogStats': 0,
- 'scrapy.contrib.spiderstate.SpiderState': 0,
- 'scrapy.contrib.throttle.AutoThrottle': 0,
+ 'scrapy.extensions.memusage.MemoryUsage': 0,
+ 'scrapy.extensions.memdebug.MemoryDebugger': 0,
+ 'scrapy.extensions.closespider.CloseSpider': 0,
+ 'scrapy.extensions.feedexport.FeedExporter': 0,
+ 'scrapy.extensions.logstats.LogStats': 0,
+ 'scrapy.extensions.spiderstate.SpiderState': 0,
+ 'scrapy.extensions.throttle.AutoThrottle': 0,
}
FEED_URI = None
@@ -131,11 +131,11 @@ FEED_STORE_EMPTY = False
FEED_EXPORT_FIELDS = None
FEED_STORAGES = {}
FEED_STORAGES_BASE = {
- '': 'scrapy.contrib.feedexport.FileFeedStorage',
- 'file': 'scrapy.contrib.feedexport.FileFeedStorage',
- 'stdout': 'scrapy.contrib.feedexport.StdoutFeedStorage',
- 's3': 'scrapy.contrib.feedexport.S3FeedStorage',
- 'ftp': 'scrapy.contrib.feedexport.FTPFeedStorage',
+ '': 'scrapy.extensions.feedexport.FileFeedStorage',
+ 'file': 'scrapy.extensions.feedexport.FileFeedStorage',
+ 'stdout': 'scrapy.extensions.feedexport.StdoutFeedStorage',
+ 's3': 'scrapy.extensions.feedexport.S3FeedStorage',
+ 'ftp': 'scrapy.extensions.feedexport.FTPFeedStorage',
}
FEED_EXPORTERS = {}
FEED_EXPORTERS_BASE = {
@@ -151,12 +151,12 @@ FEED_EXPORTERS_BASE = {
HTTPCACHE_ENABLED = False
HTTPCACHE_DIR = 'httpcache'
HTTPCACHE_IGNORE_MISSING = False
-HTTPCACHE_STORAGE = 'scrapy.contrib.httpcache.FilesystemCacheStorage'
+HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
HTTPCACHE_EXPIRATION_SECS = 0
HTTPCACHE_IGNORE_HTTP_CODES = []
HTTPCACHE_IGNORE_SCHEMES = ['file']
HTTPCACHE_DBM_MODULE = 'anydbm'
-HTTPCACHE_POLICY = 'scrapy.contrib.httpcache.DummyPolicy'
+HTTPCACHE_POLICY = 'scrapy.extensions.httpcache.DummyPolicy'
HTTPCACHE_GZIP = False
ITEM_PROCESSOR = 'scrapy.pipelines.ItemPipelineManager'
diff --git a/scrapy/templates/project/module/settings.py.tmpl b/scrapy/templates/project/module/settings.py.tmpl
index 37cbb4d32..11ff804ba 100644
--- a/scrapy/templates/project/module/settings.py.tmpl
+++ b/scrapy/templates/project/module/settings.py.tmpl
@@ -82,4 +82,4 @@ NEWSPIDER_MODULE = '$project_name.spiders'
#HTTPCACHE_EXPIRATION_SECS=0
#HTTPCACHE_DIR='httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES=[]
-#HTTPCACHE_STORAGE='scrapy.contrib.httpcache.FilesystemCacheStorage'
+#HTTPCACHE_STORAGE='scrapy.extensions.httpcache.FilesystemCacheStorage'
diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
index a29b419b0..3d87bcb9a 100644
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -100,7 +100,9 @@ scrapy/downloadermiddlewares/retry.py
scrapy/downloadermiddlewares/httpproxy.py
scrapy/downloadermiddlewares/cookies.py
scrapy/contrib/statsmailer.py
+scrapy/extensions/statsmailer.py
scrapy/contrib/memusage.py
+scrapy/extensions/memusage.py
scrapy/commands/deploy.py
scrapy/commands/bench.py
scrapy/mail.py
diff --git a/tests/test_downloadermiddleware_httpcache.py b/tests/test_downloadermiddleware_httpcache.py
index 9c1678488..ac954cc15 100644
--- a/tests/test_downloadermiddleware_httpcache.py
+++ b/tests/test_downloadermiddleware_httpcache.py
@@ -17,8 +17,8 @@ from scrapy.downloadermiddlewares.httpcache import HttpCacheMiddleware
class _BaseTest(unittest.TestCase):
- storage_class = 'scrapy.contrib.httpcache.DbmCacheStorage'
- policy_class = 'scrapy.contrib.httpcache.RFC2616Policy'
+ storage_class = 'scrapy.extensions.httpcache.DbmCacheStorage'
+ policy_class = 'scrapy.extensions.httpcache.RFC2616Policy'
def setUp(self):
self.yesterday = email.utils.formatdate(time.time() - 86400)
@@ -127,7 +127,7 @@ class DefaultStorageTest(_BaseTest):
class DbmStorageTest(DefaultStorageTest):
- storage_class = 'scrapy.contrib.httpcache.DbmCacheStorage'
+ storage_class = 'scrapy.extensions.httpcache.DbmCacheStorage'
class DbmStorageWithCustomDbmModuleTest(DbmStorageTest):
@@ -146,7 +146,7 @@ class DbmStorageWithCustomDbmModuleTest(DbmStorageTest):
class FilesystemStorageTest(DefaultStorageTest):
- storage_class = 'scrapy.contrib.httpcache.FilesystemCacheStorage'
+ storage_class = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
class FilesystemStorageGzipTest(FilesystemStorageTest):
@@ -157,12 +157,12 @@ class FilesystemStorageGzipTest(FilesystemStorageTest):
class LeveldbStorageTest(DefaultStorageTest):
pytest.importorskip('leveldb')
- storage_class = 'scrapy.contrib.httpcache.LeveldbCacheStorage'
+ storage_class = 'scrapy.extensions.httpcache.LeveldbCacheStorage'
class DummyPolicyTest(_BaseTest):
- policy_class = 'scrapy.contrib.httpcache.DummyPolicy'
+ policy_class = 'scrapy.extensions.httpcache.DummyPolicy'
def test_middleware(self):
with self._middleware() as mw:
@@ -254,7 +254,7 @@ class DummyPolicyTest(_BaseTest):
class RFC2616PolicyTest(DefaultStorageTest):
- policy_class = 'scrapy.contrib.httpcache.RFC2616Policy'
+ policy_class = 'scrapy.extensions.httpcache.RFC2616Policy'
def _process_requestresponse(self, mw, request, response):
try:
diff --git a/tests/test_contrib_feedexport.py b/tests/test_feedexport.py
similarity index 99%
rename from tests/test_contrib_feedexport.py
rename to tests/test_feedexport.py
index e6fd38ee3..41913e401 100644
--- a/tests/test_contrib_feedexport.py
+++ b/tests/test_feedexport.py
@@ -16,7 +16,7 @@ from tests.mockserver import MockServer
from w3lib.url import path_to_file_uri
import scrapy
-from scrapy.contrib.feedexport import (
+from scrapy.extensions.feedexport import (
IFeedStorage, FileFeedStorage, FTPFeedStorage,
S3FeedStorage, StdoutFeedStorage
)
diff --git a/tests/test_contrib_spiderstate.py b/tests/test_spiderstate.py
similarity index 94%
rename from tests/test_contrib_spiderstate.py
rename to tests/test_spiderstate.py
index 8e5897db7..1ddce4b99 100644
--- a/tests/test_contrib_spiderstate.py
+++ b/tests/test_spiderstate.py
@@ -2,7 +2,7 @@ import os
from datetime import datetime
from twisted.trial import unittest
-from scrapy.contrib.spiderstate import SpiderState
+from scrapy.extensions.spiderstate import SpiderState
from scrapy.spider import Spider