From c97537fbe9f05d8ccc0307b167ca96cc2880ffd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 19 Mar 2020 14:05:19 +0100 Subject: [PATCH] fix: Strip tabs/spaces around URL --- lookyloo/lookyloo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index 074f5a13..d900b69b 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -183,6 +183,7 @@ class Lookyloo(): def scrape(self, url: str, cookies_pseudofile: Optional[BufferedIOBase]=None, depth: int=1, listing: bool=True, user_agent: Optional[str]=None, perma_uuid: str=None, os: str=None, browser: str=None) -> Union[bool, str]: + url = url.strip() url = refang(url) if not url.startswith('http'): url = f'http://{url}'