Skip to content

Commit

Permalink
Reduce waiting times for selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasExorde authored Jun 22, 2023
1 parent 0850863 commit 00156f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/scraping/twitter/a7df32de3a60dfdb7a0b/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,10 @@ def log_in(env="/.env", wait=4):
logging.exception("An error occured retrieving cookies: %s",e)

logging.info("[Twitter Chrome] refreshing to Home after cookie import.")
sleep(random.uniform(7, 10))
sleep(random.uniform(1, 4))
driver.get(target_home_url)
logging.info("[Twitter Chrome] Checking if we are on same URL...")
sleep(random.uniform(2, 5))
sleep(random.uniform(1, 5))
# Check if we are indeed on the target URL
logging.info("[Twitter Chrome] Current URL = %s",str(driver.current_url))
if not target_broad in driver.current_url:
Expand Down

0 comments on commit 00156f9

Please sign in to comment.