您好,登錄后才能下訂單哦!
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
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。