I want to scrawl data from linked In page that comes after login. All I need to do is with pure JavaScript. Below is the code that I'm using to scrawl data.
window.onload = function(){ var request = new XMLHttpRequest();
request.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
console.log(this.responseText);
}
};
request.open('GET', 'https://www.linkedin.com/sales/home');
request.send();
And I'm getting below error in form of screenshot: Error Screenshot
I also tried to add header request but it didn't work.
Note: request.open is working against some website's but not all.
Any help will be appreciated. Thanks.
Your code work really well, but the problem is the destination site "linkedin.com" does not allow you to fetch data. Please take a look at their documentation. https://developer.linkedin.com/