Taiwan Lottery Crawler 台灣彩券爬蟲
Project description
Taiwan Lottery Crawler
介紹
這個專案是用來爬取 台灣彩券 官網上歷史的開獎紀錄,目前支援威力彩、大樂透、今彩539、雙贏彩 4 種彩券遊戲。
功能
- 爬取威力彩、大樂透、今彩539、雙贏彩 4 種彩券遊戲的開獎紀錄。
環境需求
Python >= 3.6
安裝
pip install taiwanlottery
範例
爬取當月份的開獎紀錄(民國年份)
威力彩
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.super_lotto()
print(result)
大樂透
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.lotto649()
print(result)
今彩539
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.daily_cash()
print(result)
雙贏彩
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.lotto1224()
print(result)
爬取指定年月的開獎紀錄
威力彩
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.super_lotto(False, False, ['113', '6'])
print(result)
大樂透
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.lotto649(False, False, ['113', '6'])
print(result)
今彩539
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.daily_cash(False, False, ['113', '6'])
print(result)
雙贏彩
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.lotto1224(False, False, ['113', '6'])
print(result)
參數設定
關閉 Terminal 顯示
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.lotto649(False)
print(result)
儲存開獎結果成 JSON 檔案
from TaiwanLotteryCrawler import TaiwanLotteryCrawler
lottery = TaiwanLotteryCrawler()
result = lottery.lotto649(False, True)
print(result)
資料來源
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for taiwanlottery-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe8827592c6c4663e4d35dff72e98361a252c1a44404290793c2b9d04489ffd3 |
|
MD5 | 86945fddad1ee549f1e40de5cb7a12bb |
|
BLAKE2b-256 | 5c65b4459aecabcba2a863eb53b126e975ba3f7449997414d744012372b8b539 |