Fix the error "An exception has occurred: can only concatenate str (not "NoneType") to str" when the bevigil api lacks the key

This commit is contained in:
captain_686 2023-07-03 01:26:55 +08:00 committed by GitHub
parent 7834c13694
commit 0947918c9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,8 @@ def __init__(self, word) -> None:
async def do_search(self) -> None:
subdomain_endpoint = f"https://osint.bevigil.com/api/{self.word}/subdomains/"
url_endpoint = f"https://osint.bevigil.com/api/{self.word}/urls/"
if self.key is None:
self.key = ""
headers = {'X-Access-Token': self.key}
responses = await AsyncFetcher.fetch_all([subdomain_endpoint], json=True, proxy=self.proxy, headers=headers)