fix: convert max_depth from config to int

pull/79/head
Raphaël Vinot 2020-06-29 19:21:38 +02:00
parent f480db2103
commit ce6deabdad
1 changed files with 2 additions and 2 deletions

View File

@ -486,9 +486,9 @@ class Lookyloo():
else:
ua = user_agent
if depth > self.get_config('max_depth'): # type: ignore
if depth > int(self.get_config('max_depth')): # type: ignore
self.logger.warning(f'Not allowed to scrape on a depth higher than {self.get_config("max_depth")}: {depth}')
depth = self.get_config('max_depth') # type: ignore
depth = int(self.get_config('max_depth')) # type: ignore
items = crawl(self.splash_url, url, cookies=cookies, depth=depth, user_agent=ua,
log_enabled=True, log_level=self.get_config('splash_loglevel'))
if not items: