How to use the urlscan.komand_urlscan.actions.get_scan_results.schema.Output.META function in urlscan

To help you get started, we’ve selected a few urlscan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rapid7 / insightconnect-plugins / urlscan / komand_urlscan / actions / get_scan_results / action.py View on Github external
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", {})
        }