Search code examples
pythongoogle-chromegambling

Could I use python to create a chrome extension?


I would be interested in creating a roulette bot that could automatically follow a set of instructions to create a profit. The technique I would like for the bot to use would be - bet on red for y amount, if red, bet on red again for 1y, if green, bet on red for 2y dollars, if red, if green, bet on red for 4y dollars, if green, bet on red for 8y dollars... (doubles every time). Would this be able to be done using python if I want to create a chrome web extension or would I need to use a different program to do this task?


Solution

  • Chrome and other browser extensiosn are usually written in Javascript. So, you can't use "Python"'s classic runtimes such as CPython or Pypy, but you can make use of one or other project that "transpiles" Python to Javascript.

    One such project is Brython, which performs its magic entirely in the browser, at run time (for an extension, it would be at Extension startup);