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

preview_player
Показать описание

- 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.

Рекомендации по теме
Комментарии
Автор

this video helped me get the images from Twitter. Thank you!

danielaparicio
Автор

omg this is awesome! Thanks for making tutorial. I've recently started node.js its really interesting since i already know some javascript.

milorad
Автор

just a small thing:
touch can create multiple files at once, just separated by a space:
touch app.js scraper.js

miyalys
Автор

@ 3:44 : arent you misusing your "error" parameter here? In the case of an error your callback will have an object with "error" as a key, and "error" as a value in it... Wont they both get interpreted the same way by Node? Greets and thanks for the cool vid

oscarvanvelsen
Автор

How can I return a value from this function?, I did exactly, and it works on console, but If Iwant to return a value to use in other function I get undefined

JairoPy
Автор

well done guys. amazing channel. keep up the good work!

roozbehy
Автор

Waow i never coded before but i watched all your videos, because they are so well explained that its a joy to watch them in hope to learn to code in the same time :-) I have a question, is it possible to make a exe like in C# which has a own window and a Graphical interface with JS instead of console?

tamgaming
Автор

awesome screencast (y)
please make video about web automation with node.js :)

DeoWibawa
Автор

what to use if there is nested request inside a forloop?

shubhamdubey
Автор

How to cycle through many pages to collect data and deal with nodejs synchronized threads? For example if I want to download images with all scraped links one by one and without making 10-20 parallel downloads?

MrYoklmn
Автор

Can you please demonstrate scraping the comments in the same imgur site. ??

rohankahalekar