Skip to main content

Taiwan Lottery Crawler 台灣彩券爬蟲

Project description

Taiwan Lottery Crawler

PyPI PyPI - Downloads CI Status codecov Maintainability Rating Reliability Rating Bugs License: MIT PRs Welcome

介紹

這個專案是用來爬取 台灣彩券 官網上歷史的開獎紀錄,目前支援威力彩大樂透今彩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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taiwanlottery-1.0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

taiwanlottery-1.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file taiwanlottery-1.0.1.tar.gz.

File metadata

  • Download URL: taiwanlottery-1.0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.1

File hashes

Hashes for taiwanlottery-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e13f0b583509f9af87a52102a5071787cc1d3e2faabc623e0861a32b552bc2a6
MD5 eb81135a14dc1574334ee5361b242aed
BLAKE2b-256 8b0e856db4de2de1a5a2ddc51cc15b4c6b43c6f90115679a9ea688b9650fea90

See more details on using hashes here.

File details

Details for the file taiwanlottery-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for taiwanlottery-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e69eba6cfc112ba116c98984de811eeb23c83c64acd219ae4d7c610e18e0d8de
MD5 3744ceba28379a8f2cf0e7a4d75b9c8f
BLAKE2b-256 a521d21104a857fa298e9c2357020eceda7d7ee5edf4e10f8c0721ae3a72790d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page