您好,登錄后才能下訂單哦!
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。