爬蟲方法及工具很多,Windows的環境還是方便一些,先抓一些來測試功能及行為,同時記錄一下免得忘了
-
爬蟲在Windows 10 install Python3.6 運行
-
Setup Python path in windows 在命令提示下: C>path %path%;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\ 或是在系統環境變數path 加入C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\
-
Setup PIP path in windows 在命令提示下: C>path %path%;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts 或是在系統環境變數path 加入C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts
- pip install setuptools
- pip install requests
- pip install beautifulsoup4
- pip install bs4
- pip install lxml
- pip install pandas
Stock_TWT38U.py
- r=requests.get('https://www.twse.com.tw/fund/TWT38U?response=jsonl')
- r=requests.get('https://www.twse.com.tw/fund/TWT38U?response=jsonl&date=20190716', headers=headers) Other
- request TWT38U? 外陸資買賣資訊
- request TWT43U? 自營商買賣資訊
- request TWT44U? 投信買賣資訊
Stock_TWSE.py
https://github.com/Asoul/tsec https://github.com/nelsonchung/TaiwanStockMonitor