Get the data as response from URL report
See original GitHub issueHere is the code
import vt
client = vt.Client(<API KEY>)
analysis = client.scan_url('https://21stcenturywire.com/2021/04/07/texas-governor-signs-order-banning-use-of-vaccine-passports/', wait_for_completion=True)
print(analysis)
Output
analysis u-17cca8a680d8c2b04a044cc689cdb2dadde2b43abcc2edfe290f3cb552d49bbe-1619945963
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0000017280919610>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x0000017280944220>, 6975.046)]']
connector: <aiohttp.connector.TCPConnector object at 0x0000017280919430>
But I want the result in terms of JSON to be added to my streamlit web app : https://developers.virustotal.com/reference#url-report
{
'response_code': 1,
'verbose_msg': 'Scan finished, scan information embedded in this object',
'scan_id': '1db0ad7dbcec0676710ea0eaacd35d5e471d3e11944d53bcbd31f0cbd11bce31-1390467782',
'permalink': 'https://www.virustotal.com/url/__urlsha256__/analysis/1390467782/',
'url': 'http://www.virustotal.com/',
'scan_date': '2014-01-23 09:03:02',
'filescan_id': null,
'positives': 0,
'total': 51,
'scans': {
'CLEAN MX': {
'detected': false,
'result': 'clean site'
},
'MalwarePatrol': {
'detected': false,
'result': 'clean site'
}
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Export a Report Using URL Access - SQL - Microsoft Learn
Learn how to export a report using URL access by specifying the format in which to render a report by using the rs:Format...
Read more >Response.url - Web APIs | MDN
The url read-only property of the Response interface contains the URL of the response. The value of the url property will be the...
Read more >Generate Report via URL and GET request - python
However, I can't get the response object to be the report itself and subsequently, can't get the report as a Data Frame. Unfortunately...
Read more >response.url - Python requests - GeeksforGeeks
response.url returns the URL of the response. It will show the main url which has returned the content, after all redirections, if done....
Read more >How To Use the JavaScript Fetch API to Get Data - DigitalOcean
The response parameter takes the value of the object returned from fetch(url) . Use the json() method to convert response into JSON data:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @hritik5102,
Try doing
or
The
_async
method use case would be launching multiple analyses in parallel and then fetching their results, something like this:If you’re only analysing one URL, using
scan_url
vsscan_url_async
has (almost) no performance improvements I’d say.Take in mind
await
should be used inside async functions, to learn more check out the python docsI hope this helps.
Regards, Marta
Hello @hritik5102,
Once you have your analysis object (returned from
scan_url
function) you can use itsto_dict
method:I hope this helps.
Regards, Marta