Skip to main content

WebScraper

This Script is part of the Web Scraper Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.0.0 and later.

An Automation Script to Web Scrap a URL or HTML Page

Script Data#


NameDescription
Script Typepython3
Tags
Cortex XSOAR Version6.0.0

Inputs#


Argument NameDescription
page_urlPage url to scrap
page_htmlHTML page to scrap
headersRequest headers
paramsRequest parameters
navigator_treeHTML tags navigation tree, example: "body.table"
insecureIgnore certificate validation errors

Outputs#


PathDescriptionType
WebScraper.TreeScraped PagesString

Script Example#

!WebScraper page_url=https://example.com navigator_tree=body

Context Example#

{
"WebScraper": {
"Tree": [
{
"h1": "Example Domain"
},
{
"p": [
"This domain is for use in illustrative examples in documents. You may use this\n domain in literature without prior coordination or asking for permission.",
{
"a": {
"#text": "More information...",
"@href": "https://www.iana.org/domains/example"
}
}
]
}
]
}
}

Human Readable Output#

Scrapping completed!