[Python] Problem with web scraping with selenium in python

Discussão em 'Python' iniciado por Stack, Maio 16, 2025.

  1. Stack

    Stack Membro Participativo

    I have written code to log in to a website with Python. But it takes very long to implement and does not lead to what is expected and gives a message saying "DevTools listening on". (The send_keys command doesn’t work and will not write “password” and “username” to input boxes).

    The code is:

    from selenium import webdriver
    from selenium.webdriver.common.by import By
    import time
    username="rahbar"
    password="password"
    print("something before scrape")
    driver = webdriver.Chrome()

    driver.get("https://plp.irbroker.com/index.do")
    time.sleep(100) #waits 100 seconds
    driver.maximize_window()
    driver.find_element("name", "j_username").send_keys(username)

    driver.find_element_by_name( name="j_password" ).send_keys(password)
    print("something after scrape")


    The message gotten in the terminal is

    something before scrape
    *DevTools listening on ws://127.0.0.1:57315/devtools/browser/fd73344f-c857-439e-b20c-c0e76d39f389
    Created TensorFlow Lite XNNPACK delegate for CPU.
    Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors (tensor#58 is a dynamic-sized tensor)*


    I expect the code to open the webpage and write “password” and “username” to input boxes in a reasonable short time period.

    Can you guide me on this issue?

    Continue reading...

Compartilhe esta Página