I have such a problem...
I need to parse a certain page of the site.For this I used axios
or needle
.
The problem is that when I run the project locally and want to get the data, everything works fine.
But when I run the project on heroku and call the method to get the html page from the site, the site returns me the page "Please enable cookies".
I tried adding various additional parameters to the header but it doesn't help me
Example of a function:
let response = await axios.get(url);
let data = response.data;
var $ = cheerio.load(data);
OR
needle.get(URL, function (err, res) {
if (err) console.log("ERR: ", err);
let body = res.body;
var $ = cheerio.load(body);
});
What do I need to do to get a site page?