Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assistance=f"If the problem persists, please contact support. Response was: {response.text}")
try:
ret = js["data"]
su = js["task"]["screenshotURL"]
except KeyError as e:
raise PluginException(cause="Received an unexpected response from the Urlscan API. ",
assistance=f"Please ensure your scan report is ready and that you're using a valid scan ID: Response was: {response.text}",
data=e)
ret["screenshotURL"] = su
return {
Output.SCAN_RESULTS: ret,
Output.TASK: js.get("task", {}),
Output.PAGE: js.get("page", {}),
Output.LISTS: js.get("lists", {}),
Output.META: js.get("meta", {}),
Output.STATS: js.get("stats", {}),
Output.VERDICTS: js.get("verdicts", {})
}