I'm trying to get a pdf document from a website but I keep getting the code on the pdf instead of pictures or "screenshots" of it. I want to stick to cheerio and fs.
this is where it saves.
const pdf_completo = fs.createWriteStream('paginas/pdf_completo.pdf');
This is the function im trying to use to obtain it.
async function obtener_pdf_pagina(){
const $ = await request({
uri: 'http://quotes.toscrape.com/',
transform: pdf => cheerio.load(pdf)
});
const todo_pagina = $('*');
pdf_completo.write(todo_pagina.html());
}