fix: Strip tabs/spaces around URL

pull/79/head
Raphaël Vinot 2020-03-19 14:05:19 +01:00
parent 43de086628
commit c97537fbe9
1 changed files with 1 additions and 0 deletions

View File

@ -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}'