File: sep-010.rst

package info (click to toggle)
python-scrapy 2.13.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,664 kB
  • sloc: python: 52,028; xml: 199; makefile: 25; sh: 7
file content (70 lines) | stat: -rw-r--r-- 1,239 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
=======  ===========================================
SEP      10
Title    REST API
Author   Pablo Hoffman
Created  2009-11-16
Status   Obsolete (JSON-RPC API implemented instead)
=======  ===========================================

=================
SEP-010: REST API
=================

This SEP proposes a JSON REST API for controlling Scrapy in server-mode, which
is launched with: ``scrapy-ctl.py start``

Operations
==========

Get list of available spiders
-----------------------------

``GET /spiders/all``

Get list of closed spiders
--------------------------

``GET /spiders/closed``

Get list of scheduled spiders
-----------------------------

``GET /spiders/scheduled``

.. note:: contains closed

Get list of running spiders
---------------------------

``GET /spiders/opened``

- returns list of dicts containing spider ``id`` and ``domain_name``

Schedule spider
---------------

``POST /spiders``

- args: ``schedule=example.com``

Close spider
------------

``POST /spider/1238/close``

Get global stats
----------------

``GET /stats``

.. note:: spider-specific not included

Get spider-specific stats
-------------------------

``GET /spider/1238/stats/``

Get engine status
-----------------

``GET /engine/status``