Skip to main content

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樂合彩、39樂合彩、49樂合彩 9 種彩券遊戲的開獎紀錄。

環境需求

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)

爬取指定年月的開獎紀錄(YYYY-MM)

威力彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.super_lotto(['2023', '06'])
print(result)

大樂透

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto649(['2023', '06'])
print(result)

今彩539

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.daily_cash(['2023', '06'])
print(result)

雙贏彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto1224(['2023', '06'])
print(result)

3星彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto3d(['2023', '08'])
print(result)

4星彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto4d(['2023', '08'])
print(result)

38樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto38m6(['2023', '08'])
print(result)

39樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto39m5(['2023', '08'])
print(result)

49樂合彩

from TaiwanLottery import TaiwanLotteryCrawler

lottery = TaiwanLotteryCrawler()
result = lottery.lotto49m6(['2023', '08'])
print(result)

資料來源

License

MIT License

Metadata

Release files for taiwanlottery 1.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taiwanlottery 1.5.3
File Size Uploaded
taiwanlottery-1.5.3.tar.gz 10.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taiwanlottery 1.5.3
File Interpreter ABI Platform
taiwanlottery-1.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / taiwanlottery-1.5.3.tar.gz

Download URL taiwanlottery-1.5.3.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
60e74f29df25461778c65bcb51c9287cf43135d836c7159f072ade96899286a8
BLAKE2b-256 checksum
How to use checksums
3c562778e678d07d9a8caf38b54a8dbd3d220aeba634e6f5fcb293376387f2f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / taiwanlottery-1.5.3-py3-none-any.whl

Download URL taiwanlottery-1.5.3-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d0140056abca0ea148cf83655c9239ef5114dea91d54be99ea8e9bcd9012556
BLAKE2b-256 checksum
How to use checksums
d9f34aa21c67d78f83f642c19841193cfe7cc22555d4f8cd845a5380627bbfac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

1.5.3 This release

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page