Switch to English?
Yes
Переключитись на українську?
Так
Переключиться на русскую?
Да
Przełączyć się na polską?
Tak
Post your project for free and start receiving proposals from freelancers within minutes after publication!

Python Selenium – Correction of Error

Translated

  1. 866    15  0
    2 days11 USD

    Hello to you.
    I specialize in Python. I recently made a project on selenium. The fact is that on the server you also need to install the Chrome driver. You are currently trying to use the driver from a local server environment, so there is a mistake.
    I propose to transfer the script to Heroku hosting. There are all the necessary tools.

  2. Another 2 proposals concealed
    1 proposal concealed
    1 proposal concealed
  • Aleksandr Golobrodsky
    2 March 2023, 17:41 |

    Добрый день есть 3 вопроса. 1) Сам хром на сервере стоит? 2) Драйвер селениум стоит? 3) Папка профиля на сервере есть? 

  • Oleg Oleg
    2 March 2023, 19:32 |

    Добрый день

    1. Хром стоит

    2. Хромдрайвер лежит в той же папке, что и скрипт

    3. Профили у нас подтягиваются из основного хрома

  • Aleksandr Golobrodsky
    2 March 2023, 19:57 |

    Версии хрома и драйвера одинаковые? Ну это писали. Библиотеки переносили с помощью requirements.txt или устанавливали через пип? 



  • Oleg Oleg
    2 March 2023, 20:10 |

    Версии одинаковые

    Библиотеки через пип ставили


    У нас ситуация такая. Сервер у нас локальный. Мы даже для теста подключили к нему монитор. 


    И если через монитор запустить наш скрипт через терминал. Или через Visual Studio Code. То все работает


    А когда мы вешаем скрипт на супервайзер. Вот тогда и перестает работать. Или висит или ошибка. Причем если отключить профили. То оно работает. А с профилями - нет

  • Anatoly Kustov
    2 March 2023, 20:08 |

    импорты:

    from selenium import webdriver

    from selenium.webdriver.chrome.options import Options

    from selenium.webdriver.chrome.service import Service

    from webdriver_manager.chrome import ChromeDriverManager

    from selenium.webdriver.common.by import By

    from selenium.webdriver.support.wait import WebDriverWait

    from selenium.webdriver.support import expected_conditions as EC

    from time import sleep


    Запуск:

    options = Options()

    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)

  • Aleksandr Golobrodsky
    2 March 2023, 20:17 |

    То есть с монитором работает без не работает?( Или когда запускаете с сервера то работает. А когда через ssh то не работает? )


  • Oleg Oleg
    2 March 2023, 21:25 |

    РАБОТАЕТ

    - Если подключить к серверу монитор и запусить скрипт через VS Code

    - Если подключить к серверу монитор, зайти в терминал и запустить скрипт через python3 script.py


    НЕ РАБОТАЕТ

    - Если подключить скрипт на supervisor

    - Если через SSH

  • Anatoly Kustov
    2 March 2023, 21:31 |

    у вас все написано в ошибке - хромдрайвер по указанному адресу недоступен, так как вы указываете к нему путь (executable_path ...). В новой версии Селениума во-избежании таких ошибок установку драйвера сделали по-другому. Попробуйте сделать импорты и запуск драйвера как я вам написал выше. А строку где вы указываете путь к драйверу удалите

  • Karina Tarasyuk
    4 March 2023, 10:56 |

    Может быть вы запускате файл не от имени администратора? Если через терминал и VS Code работает, а в остальных случаях нет

  • Aleksandr Golobrodsky
    2 March 2023, 20:20 |

    Через screen не пробовали? 

  • Oleg Oleg
    2 March 2023, 21:25 |

    Через screen - это как?

  • Artem Nemirov
    2 March 2023, 23:05 |

    GNU Screenсвободная консольная утилита-мультиплексор, предоставляющая пользователю доступ к нескольким сессиям в рамках одной сессии. Это полезно для работы с несколькими программами из командной строки, а также для запуска программ на удаленном сервере.

  • Artem Nemirov
    2 March 2023, 23:06 |

    Олег, кромк путь к драйверу еще нужно добввить путь к профилям

    #provide location where chrome stores profiles

    options.add_argument(r"--user-data-dir=/home/username/.config/google-chrome")

    #provide the profile name with which we want to open browser

    options.add_argument(r'--profile-directory=Profile 3')

  • Artem Nemirov
    2 March 2023, 23:07 |

    Олег, кромк путь к драйверу еще нужно добввить путь к профилям 

    ===

    Олег, кроме путь к драйверу еще нужно добавить путь к профилям 

    😁

  • Leonid Epifanov
    3 March 2023, 6:44 |
    вот цю строку закоментуйте:
    option.add_argument(rf'user-data-dir={path}')
    
    

Current freelance projects in the category Python

A bot needs to be created in Telegram for subscription payment.

45 USD

A bot needs to be created in Telegram where users can subscribe for access to the webcams located in the yard. Organize payment for two types of subscriptions (monthly and daily) in the bot. The bot should automatically check the payment and then provide access links.

PythonBot Development ∙ 12 hours 15 minutes back ∙ 62 proposals

Parsing and classification of a large array of images

It is necessary to implement a project for collecting and structuring a large array of architectural images from open web sources.The task includes: automated collection of images; uploading files in the highest available quality; classification of images by categories:…

PythonData Parsing ∙ 19 hours 15 minutes back ∙ 30 proposals

Business logic of the platform: class confirmation, attendance control, and lesson history (Django

Refinement of the business logic of the educational platform: lesson confirmation, attendance control, and lesson history (Django + React) A complete system for lesson confirmation, attendance control, and storage of confirmation history needs to be implemented. Important…

Python ∙ 3 days back ∙ 29 proposals

Improvement of the administrative panel of the educational platform (Django + React)

Improvement of the administrative panel of the educational platform (Django + React) Project description: There is an existing educational platform (marketplace, similar to Preply), developed on Django + React. It is required to enhance the existing administrative panel and…

PythonWeb Programming ∙ 4 days 21 hours back ∙ 58 proposals

Data collection script (JS execution)

Good day, there is a list of links to 0lx ads, I need a script that will collect the phone number. It appears when you click the "show phone" button. Preferably done in Python, but other options are also okay. How much would it approximately cost and how long would it take?

PythonData Parsing ∙ 5 days 12 hours back ∙ 47 proposals

Client
Oleg Oleg
Ukraine Zaporizhzhia
Project published
3 years back
209 views
Tags