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

AI Commenting Platform for TikTok and Instagram.

Project Goal Develop a system that allows managing a large number of TikTok and Instagram accounts and automatically posting relevant comments under selected videos using AI. Main Functionality1. Account Management It is necessary to implement the ability to connect accounts:…

AI & Machine LearningPython ∙ 18 hours 21 minutes back ∙ 13 proposals

Build a customer classification model

1. There is client data in Mongo/SQL (approximately 20,000 entries with raw data). 2. It is necessary to build features and a classification model of clients into behavioral groups based on this data. 3. The project should be completed in Python.

AI & Machine LearningPython ∙ 2 days 12 hours back ∙ 34 proposals

IT Automation of VAT Reporting

223 USD

It is necessary to develop a system for automating the transfer of sales data from the CRM to the accounting system Wafeq. The system should import bank and payment reports, automatically reconcile payments with invoices, generate invoices for VAT reporting, and minimize manual…

AI & Machine LearningPython ∙ 2 days 18 hours back ∙ 44 proposals

Account reconciliation tool with the bank, cards, and accountant

Technical Assignment: Tool for Reconciling Accounts with Bank, Cards, and AccountantGeneral Goal A local tool (script/small application in Python) is needed, which is manually run once every 1-2 months on my computer and performs reconciliation between: Invoices I issued to…

PythonDesktop Apps ∙ 3 days 6 hours back ∙ 42 proposals

Automatic video posting on social media according to a schedule

Technical Assignment (TA) Automatic video publication on social media according to a scheduleProject Description A script/bot (Python preferred, or any other solution of your choice — the main thing is stability and ease of maintenance) is needed, which automatically publishes…

PythonBot Development ∙ 3 days 18 hours back ∙ 59 proposals

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