1. 下載python :
官方的下載網址 :
2. 安裝python :
windows的安裝:
其他OS安裝可以在網路上找到
3. py : (可以顯示python的版本)
4. pip : Python內建的套件管理
5. jupyter notebook : 讓你可以寫code的工具
6. 使用 pip 安裝 :
pip install jupyter notebook
7. Python Requests套件 :
對網路發動請求的套件,可實作對網頁做get、post等HTTP協定的行為pip install requests
8. Python Beautifulsoup4套件 :
9. Run " jupyter notebook " :
jupyter notebook
10. 使用 : " jupyter notebook " :
11. 一個http get的簡單範例:
import requests
from bs4 import BeautifulSoup
airUrl= "http://opendata.epa.gov.tw/webapi/Data/REWIQA/?$orderby=SiteName&$skip=0&$top=1000&format=json"
data = requests.get(airUrl) #將此url的dtat , GET下來
print(data.text) #印出data
