Added quitting the browser after finish

This commit is contained in:
Max Nuding 2022-01-12 06:33:31 +01:00
parent afba09e02d
commit 1bce8551e7
Signed by: phlaym
GPG Key ID: A06651BAB6777237

View File

@ -58,6 +58,14 @@ class NebulaLoader:
) )
def load(self) -> List[NebulaVideo]: def load(self) -> List[NebulaVideo]:
videos = []
try:
videos = self._load()
finally:
self.driver.quit()
return videos
def _load(self) -> List[NebulaVideo]:
self.driver.get('https://nebula.app/login') self.driver.get('https://nebula.app/login')
username_input = '//*[@name="email"]' username_input = '//*[@name="email"]'