《用Python寫網絡爬蟲》示例網站搭建(框架+本書pdf+章節代碼)

所用到的代碼及工具python

示例網站源碼+框架+本書pdf+章節代碼web

連接: https://pan.baidu.com/s/1miHjIYk 密碼: af35shell

環境瀏覽器

python2.7app

win7x64框架

示例網站搭建python2.7

wswp-places.zip 書中站點源碼
web2py_src.zip 站點所使用的框架ssh

1 解壓web2py_src.zip
2 而後到web2py/applications目錄下工具

3 將wswp-places.zip解壓到applications目錄下網站

   
4 返回上一層目錄,到web2py目錄下,雙擊web2py.py,或者 執行命令python web2py.py

    

若是設置了admin密碼,使用命令python web2py.py --password=<password>,沒有設置密碼默認空


5 瀏覽器訪問 http://127.0.0.1:8000/places

 

 

 


 

書上的正經途徑

網站源代碼託管在 https://bitbucket.org/wswp/places

(註冊時,須要翻,用到Google帳號。須要安裝sourceTree)

代碼使用web2py框架搭架

This app relies on the web2py framework, which can be downloaded here and is documented here.
http://web2py.com/init/default/download
http://web2py.com/book

安裝步驟

文字版,方便複製

In the shell the installation instructions are as follows:
# first download web2py
wget http://www.web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
# now download the app
cd web2py/applications
hg clone ssh://hg@bitbucket.org/wswp/places
# now start the web2py server with a password for the admin interface
cd ..
python web2py.py --password=<password>

The places app can now be accessed in your web browser at http://127.0.0.1:8000/places

相關文章
相關標籤/搜索