djangospider-0.11
توضیحات
three ways for spider by python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | djangospider-0.11 |
| نام | djangospider |
| نسخه کتابخانه | 0.11 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | alex shu |
| ایمیل نویسنده | daxia4444@qq.com |
| آدرس صفحه اصلی | UNKNOWN |
| آدرس اینترنتی | https://pypi.org/project/djangospider/ |
| مجوز | UNKNOWN |
djangospider is light web crawling framework, it have a few code, but
can do high speed crawling, it support three modes to crawl: multithreading,
tornado IOloop, and twisted rector.you can easily to understand to how to use
async crawler.
Requirement:
Python2.7
Works on Linux
Install:
you can download the zip package in github. then unpack the zip package,
find the path of setup.py, Execute the command:
$sudo python setup.py install
The entry function: Start(start_urls,mode)
start_urls parameter: is a list, and it's element is tuple:
the first of the tuple is url which you will crawl,
the second of the tuple is the callback for url.
the mode parameter: the crawler's way, it has three types:
if mode is int 1 : multithreading ways
if mode is int 2 : tornado async ways
if mode is int 3 : twisted async ways
For example:
from djangospider.mycrawl.run import Start ,_crawl
def callback(response,url):
print "get the %s" %url
start_urls=[('http://github.com/',callback),]
نحوه نصب
نصب پکیج whl djangospider-0.11:
pip install djangospider-0.11.whl
نصب پکیج tar.gz djangospider-0.11:
pip install djangospider-0.11.tar.gz