I am getting cors error while trying to scrape website. When I tried to run the website again by enable cors unblock extension for Chrome it scrapped the data perfectly but it was only for user side while I want it to be client side too anyway to implement what that extension used in my axios header here is the extension I used https://chrome.google.com/webstore/detail/cors-unblock/lfhmikememgdcahcdlaciloancbhjino
And below is the node js code :-
const axios = require('axios');
const jsdom = require('jsdom');
const {JSDOM} = jsdom;
(async () => {
const html = await axios.get('https://beemanga.net/latest-update/', {
method: 'PATCH',mode: 'no-cors',
headers: {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',
'Accept': 'application/json',
'Content-Type': 'application/json',
},
withCredentials: true,
credentials: 'same-origin',
crossdomain: true,
});
Thanks in advance hoping to get some suggestions from your side.