Giter Site home page Giter Site logo

fpoppinga / kicktipp-bot Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 62 KB

You're invited for a kicktipp game, but don't know anything about soccer? No problem, just let this bot guess for you.

TypeScript 95.38% Dockerfile 4.62%
browser-automation typescript nightwatch

kicktipp-bot's Introduction

Update FIFA World Cup 2018

I tested this bot briefly in the official game GAME_SLUG=wm18-tippspiel. It seems to work, but it may or may not break in the future. Don't hesitate to file a bug, as I will probably not be using it actively.

Usage

  1. Run > yarn install.
  2. setup an .env file with your kicktipp username, group and password as follows:
USER_NAME=bratwurst
PASSWORD=very_secure_passw0rd
GAME_SLUG=meine-tipprunde
  1. Run > yarn start and enjoy.

Pro Tips

  • If you don't know, why the bot fails, run it in window mode: yarn start --env window
  • Make sure, you have answered all non-result questions before starting the bot (e.g. "Who will become FIFA World Champion 2018?" - the bot does not know which team will dominate (although it is in favor of Germany...)

Feature Requests

  • add a smarter predictor implementation, which does not rely on the btwin quota, so it can predict e.g. the whole Bundesliga season in one session
  • dump nightwatch for something nicer, e.g. puppeteer.

kicktipp-bot's People

Contributors

fpoppinga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kicktipp-bot's Issues

Update for Bundesliga

Could you update it for the current Bundesliga season? It only fills out the first page.

Script fails to login to kicktipp

Hi @fpoppinga
I wanted to use your bot (for the world championship).
But your script fails to login to kicktipp.
The script doest find/get the .messagebox.success div.
Im not sure what is the cause of this, credentials should be correct in the .env File (double checked that).

See logs for more info:

yarn start
yarn run v1.3.2
$ yarn build && yarn run nightwatch
$ tsc
$ nightwatch
Before!

[Kicktipp] Test Suite
=========================

Running:  login
:starkes_häkchen: Element <#kennung> was visible after 32 milliseconds.
:starkes_häkchen: Element <#passwort> was visible after 21 milliseconds.
:starkes_häkchen: Element <.formsubmit input[type="submit"]> was visible after 24 milliseconds.
:starkes_malzeichen_x: Timed out while waiting for element <.messagebox.success> to be present for 15000 milliseconds.  - expected "visible" but got: "not found"
   at Page.assertLoginSuccessful (/Users/iot/kicktipp-bot/dist/pages/homepage.js:4:21)
   at Object.login (/Users/iot/kicktipp-bot/dist/tests/kicktipp.js:23:14)


FAILED:  1 assertions failed and 3 passed (19.683s)

_________________________________________________

TEST FAILURE:  1 assertions failed, 3 passed. (19.771s)

:starkes_malzeichen_x: kicktipp

  - login (19.683s)
  Timed out while waiting for element <.messagebox.success> to be present for 15000 milliseconds.  - expected "visible" but got: "not found"
      at Page.assertLoginSuccessful (/Users/iot/kicktipp-bot/dist/pages/homepage.js:4:21)
      at Object.login (/Users/iot/kicktipp-bot/dist/tests/kicktipp.js:23:14)
  SKIPPED:
  - predict
  - end

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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.