Imgur Web Scraping + Callback vs Promise Example in Node.js

Publicado el: 15 abril 2017
en el canal de: JsWiz
7,707
114

Learn advanced scraping: https://goo.gl/QEo1ie

Repo: https://github.com/jakblak/nodeJS_exa...
check imgur_scraping folder

In this video we're going to do a cheerio + request example and scrape the website Imgur. This will also include an example of how to turn a callback into a promise.

Here you will learn how to use the request module and pass in a url to gather the contents of the web page. Then we can use cheerio module to parse the body and extract the elements we want. Then we'll use that data to display the output in our console.

The contents of our scraper will be held in a separate file and then imported into our main app.js file. We'll access the JSON output using a callback. Then we'll refactor this code to show how we can use native Promises to perform the same task.


En esta página del sitio puede ver el video en línea Imgur Web Scraping + Callback vs Promise Example in Node.js de Duración hora minuto segunda en buena calidad , que subió el usuario JsWiz 15 abril 2017, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 7,707 veces y le gustó 114 a los espectadores. Disfruta viendo!