A
A
Aleksandr2019-05-27 16:05:01
Python
Aleksandr, 2019-05-27 16:05:01

How to run selenium on heroku?

Hello everyone, I want to run a bot on heroku, with chrome, in the logs it gives an error:

2019-05-27T12:51:39.526700+00:00 app[bot.1]: Traceback (most recent call last):
2019-05-27T12:51:39.526727+00:00 app[bot.1]: File "t1.py", line 2, in <module>
2019-05-27T12:51:39.526911+00:00 app[bot.1]: from selenium import webdriver
2019-05-27T12:51:39.526942+00:00 app[bot.1]: ModuleNotFoundError: No module name
d 'selenium'

In Google I found only that I need to fasten the buildpack for Chrome, but then there were difficulties.
Does anyone have step-by-step instructions or just information.
And one more question, do I need to use a proxy for the bot on the Heroku server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
grinat, 2019-05-28
@QQQ-RRR

In most cases, these buildpacks do not plow. And selenium and chrome require a bunch of stuff to install there, recently you can use your own containers on Heroku, I advise you to assemble your own container, throw everything you need into it and run this container.

V
Vladislav Lyskov, 2019-05-27
@Vlatqa

2019-05-27T12:51:39.526727+00:00 app[bot.1]: File "t1.py", line 2, in
2019-05-27T12:51:39.526911+00:00 app[bot.1] : from selenium import webdriver
2019-05-27T12:51:39.526942+00:00 app[bot.1]: ModuleNotFoundError: No module name
d 'selenium'

tells you that you have not installed selenium

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question