Web Scrape Live Chaning Data
I am pretty new to web scraping. It is pretty easy with static content, but I would like to know if there is a way, to scrape a site like that: https://threatmap.checkpoint.com/ I
Solution 1:
Sometimes you don't need to scrape at all. But look deep into the mechanics.
This site uses built-in Browser Fetch API.
You just need decode from this source:
https://threatmap-api.checkpoint.com/ThreatMap/api/feed
Below is a sample fetch call:
fetch("https://threatmap-api.checkpoint.com/ThreatMap/api/feed", {
"headers": {
"accept": "text/event-stream",
"accept-language": "en-US,pt;q=0.9,en-US;q=0.8,en;q=0.7",
"cache-control": "no-cache",
"sec-ch-ua": "\"Google Chrome\";v=\"89\", \"Chromium\";v=\"89\", \";Not A Brand\";v=\"99\"",
"sec-ch-ua-mobile": "?0",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-site"
},
"referrer": "https://threatmap.checkpoint.com/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "omit"
});
That's a sample event:
{"a_c":1,"a_n":"DNS Enforcement Violation","a_t":"exploit","d_co":"SE","d_la":63.8284,"d_lo":20.2597,"d_s":"AC","s_co":"US","s_lo":-73.9712,"s_la":40.7428,"s_s":"NY","t":null}
Which visually seems to mean:
- Description: DNS Enforcement Violation
- Kind: Exploit
- Target Country/State: SE/AC - Lat/Lon: 63.8284, 20.2597
- Source Country/State: US/NY - Lat/Lon: 40.7428, -73.9712
Post a Comment for "Web Scrape Live Chaning Data"