Skip to content

max619/kdmid-bot

 
 

Repository files navigation

Kdmid bot

Checks ability to make an appointment to consul

Setup

Register on https://2captcha.com/ and get API key.

Get order id and code from the link http://istanbul.kdmid.ru/queue/OrderInfo.aspx?id=ORDER_ID&cd=CODE

Create .env file and replace variables with your values:

$ cp .env.example .env

Docker

$ bin/build && bin/start

Run bot with:

$ bin/bot

How to see the browser?

View the firefox node via VNC (password: secret):

$ open vnc://localhost:5900

NOTE: If you want to access VNC via any public network interface you will need to update listening address in docker-compose.yml for node-firefox service

After testing that bot works properly put command to run bot in crontab, like:

*/5 * * * * cd /path/to/the/bot; bin/bot >> kdmid-bot.log 2>&1

Than you can look at the log file by:

tail -f kdmid-bot.log

Locally

Install ruby 3.1.2 with rbenv for example.

Install browser and driver: http://watir.com/guides/drivers/ You can use firefox with geckodriver.

Setup dependencies:

$ bundle

Run bot with:

$ ruby bot.rb

Issues

Problems with hcaptcha: do not pass it periodically

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 83.9%
  • Dockerfile 10.0%
  • Shell 6.1%