Coder Social home page Coder Social logo

antonengelhardt / kicktipp-bot Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 41 KB

A bot which can submit tips for a Kicktipp competition based on quotes.

License: MIT License

Dockerfile 8.97% Python 80.87% Makefile 6.21% Shell 3.94%
bot kicktipp python selenium selenium-python sportbetting sports webscraper

kicktipp-bot's People

Contributors

antonengelhardt avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

kicktipp-bot's Issues

Docker version seems not to work on arm64 (Raspberry Pi)

I tried to set up the docker container via docker-compose.yml but it seems not to work on a Raspberry Pi.
It is working fine on my main machine (Debian).

My docker-compose.yml:

version: '3'

services:
  bot:
    image: antonengelhardt/kicktipp-bot:latest
    container_name: kicktipp-bot
    restart: always
    environment:
      - KICKTIPP_EMAIL=${KICKTIPP_EMAIL}
      - KICKTIPP_PASSWORD=${KICKTIPP_PASSWORD}
      - KICKTIPP_NAME_OF_COMPETITION=${KICKTIPP_NAME_OF_COMPETITION}

The docker logs:

docker-compose up
Creating network "kicktippbot_default" with the default driver
Pulling bot (antonengelhardt/kicktipp-bot:latest)...
latest: Pulling from antonengelhardt/kicktipp-bot
bbeef03cda1f: Pull complete
f049f75f014e: Pull complete
56261d0e6b05: Pull complete
9bd150679dbd: Pull complete
5b282ee9da04: Pull complete
03f027d5e312: Pull complete
41b6012c8972: Pull complete
e84941e8ff4e: Pull complete
8848ba81439a: Pull complete
5f78639e6ef0: Pull complete
da1870f2e0a0: Pull complete
43afa570d098: Pull complete
879b4ec8dcd2: Pull complete
4f4fb700ef54: Pull complete
de128f633af7: Pull complete
527535a1882f: Pull complete
2d6e99a4b627: Pull complete
901cbeda9d62: Pull complete
81b24fb0f729: Pull complete
Digest: sha256:5b515cd51940284917ae3213a5923aad47cd98213f4b2b7feb2a03419371807f
Status: Downloaded newer image for antonengelhardt/kicktipp-bot:latest
Creating kicktipp-bot ... done
Attaching to kicktipp-bot
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot exited with code 1
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot exited with code 1
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot exited with code 1
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot exited with code 1
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot | exec /usr/local/bin/python: exec format error
kicktipp-bot exited with code 1

Dependabot

Have dependabot recommend version updated

Multi-Arch

Look into Docker BuildX to generate one image for different architecture

TypeError: object of type 'NoneType' has no len()

PS E:\Kicktipp> python .\main.py local
20.01.23 16:00: The script will execute now!

E:\Kicktipp\main.py:33: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
  driver = webdriver.Chrome(CHROMEDRIVER_PATH)  # for local

DevTools listening on ws://127.0.0.1:7355/devtools/browser/726071d9-a230-4496-a6e4-b85db8a040d6
Traceback (most recent call last):
  File "E:\Kicktipp\main.py", line 222, in <module>
    execute()
  File "E:\Kicktipp\main.py", line 42, in execute
    driver.find_element(by=By.ID, value="kennung").send_keys(EMAIL)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webelement.py", line 234, in send_keys
    Command.SEND_KEYS_TO_ELEMENT, {"text": "".join(keys_to_typing(value)), "value": keys_to_typing(value)}
                                                   ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\utils.py", line 148, in keys_to_typing
    for i in range(len(val)):
                   ^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Separate concerns

Split up main.py into different files:

  • predictor
  • config
  • main
  • scheduler (?)

Improve logging

Improve logging and different log levels (Info, debug, critical)

Setup tools

Use setup tools library to verify required pip packages

Parameters

Pass parameters along with the python command to change the behavior of the script

  • Zapier: yes or no
  • Threshholds

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.