Skip to content

Remove all sleeps #12

@banool

Description

@banool

Substantial work has been made on this already compared to where it was, but the script still has a few points where sleeping is used. Waiting for the page to load with a real time sleep is bad for at least two big reasons on each end of the spectrum:

  1. Wait too long and the script is slower without needing to be.
  2. Wait too little and the page will not have loaded, probably crashing the script.

The better approach would be to keep trying to find the appropriate element with a small delay in between each attempt, catching the exception when it hasn't yet loaded. There is a decorator in util for this already, but it doesn't play with generators very nice. The success condition is also quite strange, expecting each function to return None on failure.

Breaking all of the navigation functions into smaller pieces would likely still be good for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions