-
Notifications
You must be signed in to change notification settings - Fork 275
Description
Steps to reproduce:
- Create a new virtualenv (to avoid conflicts and what not);
- Install the latest grab from pypi;
- Create main.py and copy-paste a "Grab::Spider Example" from README.rst;
- Run the script.
Result:
DEBUG:grab.spider.base:Using memory backend for task queue
DEBUG:grab.network:[01] GET https://www.google.com/search?q=python
DEBUG:grab.network:[02] GET https://www.google.com/search?q=ruby
/home/leovp/.pyenv/versions/habratest-3.5.2/lib/python3.5/site-packages/grab/deprecated.py:250: GrabDeprecationWarning: TheGrab.response
attribute is deprecated. UseGrab.doc
instead.
warn('TheGrab.response
attribute is deprecated. '
DEBUG:grab.network:[03] GET https://www.google.com/search?q=perl
python: https://www.python.org/
ruby: https://ru.wikipedia.org/wiki/Ruby
DEBUG:grab.stat:RPS: 2.68 []
perl: https://ru.wikipedia.org/wiki/Perl
DEBUG:grab.stat:RPS: 0.00 []
DEBUG:grab.spider.parser_pipeline:Started shutdown of parser process: Thread-1
DEBUG:grab.spider.parser_pipeline:Finished joining parser process: Thread-1
DEBUG:grab.spider.base:Main process [pid=17426]: work done
The issue here is that Grab::Spider Example doesn't access grab.response attribute directly, so the warning is not justified in that case.