Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
Selenium deja de seguir solo 12 cuentas después de eso detiene el proceso

Hice un bot para instagram usando selenio. Este bot debería dejar de seguir las cuentas que sigo. ¡Funciona solo para las primeras 12 cuentas! ¡Después de eso se detiene! ¿Por qué sucedió esto? ¡Intenté usar try y except! Excepto que hice una función de desplazamiento, ¡pero no funcionó! Aquí está mi código:

 fBody = driver.find_element_by_xpath("//div[@class='isgrP']") buttons = driver.find_elements_by_xpath("//button[contains(.,'Following')]") for btn in range(len(buttons)): try: # Use the Java script to click on follow because after the scroll down the buttons will be un clickeable unless you go to it's location driver.find_element_by_xpath("//button[contains(.,'Following')]").click() #driver.execute_script("arguments[0].click();", btn) sleep(2) driver.find_element_by_xpath('//button[@class="aOOlW -Cab_ "]').click() sleep(5) except: print("Eroare") else: driver.execute_script('arguments[0].scrollTop = arguments[0].scrollTop + arguments[0].offsetHeight;', fBody)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!