Answer the question
In order to leave comments, you need to log in
Help with a parser?
There is js parser code
const axios = require('axios')
const cheerio = require('cheerio')
const path = require('path')
const parse = async() => {
const getHTML = async(url) => {
const { data } = await axios.get(url)
return cheerio.load(data)
}
const selector = await getHTML(
'google.com'
);
// selector('.card').each((i, element) => {
// const link = selector(element).find('.card__top').attr('href');
// console.log(link)
// });
selector('#description').each((i, element) => {
const link = selector(element).find('p').text();
console.log(link)
console.log(link)
});
}
parse();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question