mirror of
https://github.com/laramies/theHarvester.git
synced 2024-11-11 09:41:06 +08:00
Fix mypy error for github module
This commit is contained in:
parent
cc4173ff52
commit
910f737b87
1 changed files with 2 additions and 2 deletions
|
@ -56,8 +56,8 @@ def page_from_response(page: str, response: Response) -> Optional[int]:
|
||||||
if page_link:
|
if page_link:
|
||||||
parsed = urlparse.urlparse(page_link.get("url"))
|
parsed = urlparse.urlparse(page_link.get("url"))
|
||||||
params = urlparse.parse_qs(parsed.query)
|
params = urlparse.parse_qs(parsed.query)
|
||||||
page = params.get('page') or [None]
|
pages = params.get('page', [None])
|
||||||
page_number = page[0] and int(page[0])
|
page_number = pages[0] and int(pages[0])
|
||||||
return page_number
|
return page_number
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in a new issue