get
https://www.virustotal.com/api/v3/analyses//dom
This endpoint returns the rendered DOM that the browser captured at the end of a URL Analysis.
The response 302 Found redirects to a short-lived (5 minutes) signed URL pointing at the HTML artifact in Google Cloud Storage. Follow redirects to download the file.
Examples
Get the DOM for Analysis ID "u-109b1fe44b83bfdeaeee0d238e041915b6d71f6ce4b91f8f9ad79eac3ac7d27f-6d2fb381".
import requests
id = "u-109b1fe44b83bfdeaeee0d238e041915b6d71f6ce4b91f8f9ad79eac3ac7d27f-6d2fb381"
local_filename = "dom.html"
url = f"https://www.virustotal.com/api/v3/analyses/{id}/dom"
headers = {
"accept": "application/json",
"x-apikey": <api-key>
}
response = requests.get(url, headers=headers)
response.raise_for_status()
with open(local_filename, 'wb') as f:
f.write(response.content)