Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the time to scrape by 4 from more than 70 minutes to less than 20 minutes #23

Open
csauge opened this issue Jan 26, 2024 · 0 comments

Comments

@csauge
Copy link
Collaborator

csauge commented Jan 26, 2024

The fix is not so difficult.

  • Remove in files scraper/eventbrite.py scraper/fdc.py scraper/fec.py scraper/glide.py :
    • All time.sleep(...)
    • All driver.implicitly_wait(...)
  • Replace by :
    • wait = WebDriverWait(driver, 10)
    • Syncho for frames: wait.until(EC.frame_to_be_available_and_switch_to_it((By.ID, ...)))
    • Syncho for elements: wait.until(EC.presence_of_element_located((By.ID, ...)))
    • Syncho for all other cases: wait.until(lambda driver: driver.execute_script('return document.readyState') == 'complete')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant