GithubHelp home page GithubHelp logo

eightbithero / ambabot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lovasoa/ambabot

0.0 0.0 0.0 31 KB

Bot pour vérifier les créneaux disponibles sur paris.kdmid.ru

Shell 6.06% Python 69.13% HCL 24.81%

ambabot's Introduction

AmbaBot

AmbaBot is a Python script designed to automate checking for available slots at the russian ambassy in Paris.

Functionality

The main function of AmbaBot is to handle requests identified by the AMBASSY_REQUEST_NUMBER.

The bot will:

  • Connect to https://paris.kdmid.ru with your AMBASSY_REQUEST_NUMBER and AMBASSY_PROTECTION_CODE
  • solve the captcha using aws textract
  • extract the current status of your request
  • if there are free slots, send an email to EMAIL_TO

This project contains a Python AWS Lambda function and Terraform configuration for deploying it.

Prerequisites

  • AWS account
  • Python 3.10
  • Pipenv
  • Terraform

Local Development

  1. Install the Python dependencies:
pipenv install
  1. Run the Python script locally:
pipenv run ambabot

Deployment

  1. Build the Lambda deployment package:
./build.sh
  1. Initialize Terraform:
terraform init
  1. Apply the Terraform configuration:
terraform apply

Environment Variables

Create a .env file in the project root with the following variables:

AWS_REGION=your_aws_region
AWS_PROFILE=your_aws_profile

#  Номер заявки
AMBASSY_REQUEST_NUMBER=999999

#  Защитный код 
AMBASSY_PROTECTION_CODE=XXXXXXXX

LOG_LEVEL=DEBUG
EMAIL_TO=[email protected]
EMAIL_FROM=[email protected]

Logs

The logs are available in CloudWatch, in the log group /aws/lambda/ambabot. To view the logs, run the following command:

aws logs get-log-events --log-group-name /aws/lambda/ambabot --log-stream-name $(aws logs describe-log-streams --log-group-name /aws/lambda/ambabot --limit 1 --query 'logStreams[0].logStreamName' --output text)

ambabot's People

Contributors

lovasoa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.