fixed bug when gaia id is incorrect

This commit is contained in:
mxrch
2022-02-13 16:55:18 +01:00
parent 1ed97ff57a
commit 41fa74f71e
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ class PeoplePaHttp(HttpAPI):
# Parsing
data = json.loads(req.text)
person = Person()
if not data:
if data["personResponse"][0]["status"] == "NOT_FOUND":
return False, person
person_data = data["personResponse"][0]["person"]
+1 -1
View File
@@ -20,7 +20,7 @@ async def hunt(as_client: httpx.AsyncClient, email_address: str):
is_found, target = await people_pa.people_lookup(as_client, email_address, params_template="max_details")
if not is_found:
await as_client.aclose()
exit("[-] The target wasn't found.")
exit("\n[-] The target wasn't found.")
containers = target.sourceIds
for container in containers:
+1 -1
View File
@@ -19,7 +19,7 @@ async def hunt(as_client: httpx.AsyncClient, gaia_id: str):
is_found, target = await people_pa.people(as_client, gaia_id, params_template="max_details")
if not is_found:
await as_client.aclose()
exit("[-] The target wasn't found.")
exit("\n[-] The target wasn't found.")
containers = target.sourceIds
for container in containers: