Taiwan Lottery Crawler 台灣彩券爬蟲
Project description
Taiwan Lottery Crawler
這個專案是用來爬取 台灣彩券 官網上歷史的開獎紀錄,目前支援威力彩、大樂透、今彩539、雙贏彩 4 種彩券遊戲。
Features
- 爬取 威力彩、大樂透、今彩539、雙贏彩 4 種彩券遊戲的開獎紀錄。
- 爬取結果可直接輸出產生成
json
格式檔案進行後續使用。 - 針對單一的彩券遊戲可以爬取幾個月前的開獎紀錄。
Requirements
Install
git clone https://github.com/stu01509/TaiwanLotteryCrawler.git
cd TaiwanLotteryCrawler
pip install -r requirements.txt
Build
python setup.py sdist bdist_wheel
Publish
pip install twine
twine check .\dist\*
twine upload .\dist\*
Command
爬取當月份的開獎紀錄
python crawl.py
爬取當月份的開獎紀錄並輸出 JSON
python crawl.py -o
往回爬取指定彩券的幾個月前的開獎紀錄
爬取 5 個月前的開獎資料
python crawl.py 威力彩 -b 5
python crawl.py 大樂透 -b 5
python crawl.py 今彩539 -b 5
python crawl.py 雙贏彩 -b 5
往回爬取指定彩券的幾個月前的開獎紀錄並輸出 JSON
爬取 5 個月前的開獎資料並輸出 JSON
python crawl.py 威力彩 -b 5 -o
python crawl.py 大樂透 -b 5 -o
python crawl.py 今彩539 -b 5 -o
python crawl.py 雙贏彩 -b 5 -o
爬取指定彩券的年月的開獎紀錄
爬取 2020 年 4 月份的開獎紀錄
python crawl.py 威力彩 -t 2020-04
python crawl.py 大樂透 -t 2020-04
python crawl.py 今彩539 -t 2020-04
python crawl.py 雙贏彩 -t 2020-04
爬取指定彩券的年月的開獎紀錄並輸出 JSON
爬取 2020 年 4 月份的開獎紀錄並輸出 JSON
python crawl.py 威力彩 -t 2020-04 -o
python crawl.py 大樂透 -t 2020-04 -o
python crawl.py 今彩539 -t 2020-04 -o
python crawl.py 雙贏彩 -t 2020-04 -o
指令說明
python crawl.py -h
Data Source
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-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4fbc4c1cbe45bdddfe73cea888b8266bfc4a0251bc72043bf9f036b39c2e3ed |
|
MD5 | 9f4879e0c7863e67b4c28b315af0419e |
|
BLAKE2b-256 | f536b8262fefb7c2017c88d18dfb28b4c95a1422014eac380eec4a935b749ba2 |