scrapy support for sublime text
- Total 2K
- Win 1K
- Mac 382
- Linux 308
|Dec 4||Dec 3||Dec 2||Dec 1||Nov 30||Nov 29||Nov 28||Nov 27||Nov 26||Nov 25||Nov 24||Nov 23||Nov 22||Nov 21||Nov 20||Nov 19||Nov 18||Nov 17||Nov 16||Nov 15||Nov 14||Nov 13||Nov 12||Nov 11||Nov 10||Nov 9||Nov 8||Nov 7||Nov 6||Nov 5||Nov 4||Nov 3||Nov 2||Nov 1||Oct 31||Oct 30||Oct 29||Oct 28||Oct 27||Oct 26||Oct 25||Oct 24||Oct 23||Oct 22||Oct 21|
Scrapy Snippets for Sublime Text
Clone this package in your
Packages/ directory. No Package Control support yet :)
Snippets assume your spider has a
BASE_URLattribute. This prevents code repetition and makes your code easily portable in case the website changes it's base url.
Snippets for the most common requests are provided:
- Get: for sending a request with url request parameters, like mysite.com?parameter=value
- Post: for
- Json: for POST requests with
- A 'redirect' method, useful when you need to send a GET request without parameters.
- A 'last' method that opens up the received response in the browser and starts an ipdb shell, useful for debugging the response or playing around with xpaths.
- A asp parameter extractor, for easily getting
__EVENTVALIDATION from a response.
Format from Postman
If you're using Postman to inspect your requests to a site, you can copy & paste the parameters in 'bulk-edit' mode, and paste them into your spider. Then, select all the lines you just pasted and from the command palette execute
Scrapy: Format from Postman. The parameters will be formatted as python's dictionary keys and values.
Copy an item class definition in your spider. Then, select all the class definition lines and execute
Scrapy: Yield Item. The definition will be formatted into a
yield ClassInstance() statement.