How to use selenium with python in render?

import time
from selenium.webdriver import Keys, ActionChains
from import By
import undetected_chromedriver as uc
from import expected_conditions as EC
from import WebDriverWait
from import Options
from flask import Flask
from selenium import webdriver
app = Flask(__name__)
def scrape_example():
    options = Options()
    driver = webdriver.Chrome(options=options)
    button = driver.find_element(By.TAG_NAME, 'a')
    text = driver.find_element(By.TAG_NAME, 'p').text
    return text

this code gives me internal server error when i visit

Hi there,

You’ll need the Chrome driver installed, which is not included in our Python native environment out of the box.

You’ll have the best luck running this as a Docker container. See for more information.



I have never um used docker i did upload chromedriver to the repo but that was dumb ig so i dont know how to do it- is there a tutorial or smth? i looked on youtube but i couldnt find anything, sorry

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.