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雙贏彩3星彩4星彩38樂合彩39樂合彩49樂合彩 9 種彩券遊戲。

功能

  • 爬取威力彩、大樂透、今彩539、雙贏彩、3星彩、4星彩、38樂合彩、49樂合彩 8 種彩券遊戲的開獎紀錄。

環境需求

Python >= 3.6

安裝

pip install taiwanlottery

範例

爬取當月份的開獎紀錄

威力彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.super_lotto()
print(result)

大樂透

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto649()
print(result)

今彩539

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.daily_cash()
print(result)

雙贏彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto1224()
print(result)

3星彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto3d()
print(result)

4星彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto4d()
print(result)

38樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto38m6()
print(result)

39樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto39m5()
print(result)

49樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto49m6()
print(result)

爬取指定年月的開獎紀錄(民國年份)

威力彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.super_lotto(['112', '6'])
print(result)

大樂透

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto649(['112', '6'])
print(result)

今彩539

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.daily_cash(['112', '6'])
print(result)

雙贏彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto1224(['112', '6'])
print(result)

3星彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto3d(['112', '8'])
print(result)

4星彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto4d(['112', '8'])
print(result)

38樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto38m6(['112', '8'])
print(result)

39樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto39m5(['112', '8'])
print(result)

49樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto49m6(['112', '8'])
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.4.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taiwanlottery-1.4.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for taiwanlottery-1.4.0.tar.gz
Algorithm Hash digest
SHA256 27fb71a07500f44744dc6bfdc8d017c3530b60e2263adde2fc02694b536692b3
MD5 5344e2d7d66a815b94369b3fe4d4c42c
BLAKE2b-256 88d3e4e7f106f5f047ace98cd27616f74ec6c34f99301827ac023b6d71b2458c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taiwanlottery-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for taiwanlottery-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af7cf46a946b264e3e3c9cc987baf4c2478cf573cf97b9070c808b012b68c591
MD5 d4be05fe9735e1605c0cbf28202a0d7b
BLAKE2b-256 e78b1a391fe36e9d5e51f49082816f6222982e5836b83252289a5644e57a1a52

See more details on using hashes here.

Supported by

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