您好,登录后才能下订单哦!
1 yum groupinstall "Development tools" -y
2 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel -y
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz tar vxf Python-2.7.11.tgz
6 cd Python-2.7.11
8 ./configure --prefix=/usr/local
9 make && make install
10 python -V
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
11 python get-pip.py
wget https://pypi.python.org/packages/ff/d4/209f4939c49e31f5524fa0027bf1c8ec3107abaf7c61fdaad704a648c281/setuptools-21.0.0.tar.gz#md5=81964fdb89534118707742e6d1a1ddb4 --no-check-certificate
21 tar zxvf setuptools-21.0.0.tar.gz
23 cd setuptools-21.0.0
24 python setup.py install
25 pip install scrapy
26 cat > myspider.py <<EOF
from scrapy import Spider, Item, Field
class Post(Item):
title = Field()
class BlogSpider(Spider):
name, start_urls = 'blogspider', ['http://www.cnblogs.com/rwxwsblog/']
def parse(self, response):
return [Post(title=e.extract()) for e in response.css("h3 a::text")]
EOF
27 scrapy runspider myspider.py
scrapy startproject gl
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。