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


所用到的代碼及工具

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

鏈接: https://pan.baidu.com/s/1miHjIYk 密碼: af35

環境

python2.7

win7x64

示例網站搭建

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

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM