Skip to main content

DongHaeng Lottery Unofficial API

Project description

DongHaeng Lottery API (Unofficial)

동행복권 사이트를 터미널에서 이용할 수 있게 랩핑한 API입니다.

현재 제게 필요한 기능이 로또 6/45 구매 뿐이라서 해당 부분만 구현되어 있습니다. 만약 다른 기능이 필요하시면 아래 가이드를 따라서 직접 개발하시거나, Github Issues를 통해 개발 요청을 등록해주시길 바랍니다.

설치 및 사용법

현재는 로또645자동으로 사는 기능뿐입니다. 갯수(-c)는 1에서 5사이로 조절할 수 있습니다. 한 주에 5장을 초과해서 사려고 하면 구매가 되지 않고 적절한 에러 메시지가 출력됩니다.

한 마디로, 현재 조작할 수 있는 옵션은 -c 뿐입니다.

Windows, Linux, macOS

macOS 말고 테스트를 안해봐서, 혹 작동하지 않는다면 Issues로 알려주시길 바랍니다.

pip install dhapi # 또는 pip3 install dhapi

# 이후 다음과 같이 사용하면 됩니다

dhapi -h # 도움말 출력

dhapi -u YOUR_ID -p YOUR_PW -C lotto645 -t buy -c 5 -m auto # 로또645를 - 산다 - 5장 - 자동발급으로

etc

본 레포를 클론해서 dhapi.py를 실행시키는 방법으로도 사용하실 수 있습니다.

git clone https://github.com/roeniss/dhlottery-api
cd dhlottery-api/src/dhapi
pip3 install -r requirements.txt # 디펜던시를 전역으로 설치하고 싶지 않다면 사전에 가상환경을 활성화해주세요

# 이후 다음과 같이 사용하면 됩니다

python3 dhapi -h # 도움말 출력

python3 dhapi -u YOUR_ID -p YOUR_PW -C lotto645 -t buy -c 5 -m auto # 로또6/45를 - 산다 - 5장 - 자동발급으로

같이 개발하기

기여는 대환영입니다! CONTRIBUTION.md 파일을 참고해주세요.

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

dhapi-1.0.12.tar.gz (11.5 kB view hashes)

Uploaded Source

Built Distribution

dhapi-1.0.12-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

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