Crawler for CNYes
Project description
AnueCrawler
基於Python語言的鉅亨網爬蟲程式
安裝
pip install AnueCrawler
使用教學
#載入模組
from anuecrawler.news import headline, twstock, wdstock, blockchain
API名稱 | 說明 |
---|---|
headline | 頭條新聞 |
twstock | 台股新聞 |
wdstock | 國際股市 |
blockchain | 區塊鏈 |
#抓取當天資料
hd = headline
#指定日期範圍
hd.browse('2021-1-1','2021-1-3')
#擷取指定資料(依據鉅亨網API)
hd.query(['publishAt','title'])
#將結果輸出至CSV格式檔案(名稱可留空,預設Output.csv)
hd.query(['publishAt','title']).to_csv('Output.csv')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
AnueCrawler-1.0.3.tar.gz
(14.2 kB
view hashes)