Skip to content

What language should I use to build my bot?

Camille Louédoc-Eyriès edited this page Nov 13, 2022 · 5 revisions

The best language to build your bot will depend on many factors.

If you are building a bot that requires rendering in the browser, you should generally use JavaScript with Puppeteer. API-based bots are out of scope for this wiki; however, if facing any serious adversary, you will likely have to implement TLS fingerprint forgery, which cannot be done/hasn't been demonstrated in all languages.

Advantages of using JavaScript/TypeScript

Larger scraping ecosystem

There will be more ready-made packages to use in the JavaScript ecosystem, such as:

... and many others.

Most of the time, there will be no equivalent in, i.e. Python.

Avoiding context switches

Since you'll mostly encounter JS when scraping anyway, a JS framework naturally is helpful. This way you don't leave the "code" base, and nothing sucks more than having to constantly change the "context".

By using JS in your day-to-day programming tasks, you will be better prepared for browser automation tasks or antibot-evasion tasks, which requires a moderate level of skills in the language.

If browsers were scripted in with Python, Python would be favored.

Advantages of using your favorite language

  • you get to be as efficient as you can from day 1
  • if interacting directly with the browser using the CDP (Chrome Developer Protocol), you will gain knowledge on the internals of Chrome.