Advertisement
Guest User

Untitled

a guest
Feb 1st, 2024
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import seleniumbase.common.exceptions
  2. from seleniumbase import SB
  3. from time import sleep
  4. from random import randint
  5.  
  6.  
  7. def rand():
  8.     return randint(1200, 2400) / 1000
  9.  
  10.  
  11. with SB(uc=True) as sb:
  12.     sb.slow_mode = True
  13.     try:
  14.         sb.driver.get('https://allegro.pl/logowanie')
  15.         sb.type('#login', 'elo')
  16.         sb.type('#password', '320')
  17.         sb.slow_click('a:contains("Zaloguj się")', rand())
  18.         sb.sleep(1000)
  19.     except seleniumbase.common.exceptions.NoSuchElementException as e:
  20.         print("e")
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement