Build a Simple Web Scraper using Node.JS, Fetch and Cheerio for beginners

  Рет қаралды 9,320

Raddy

Raddy

Күн бұрын

In this tutorial, we are going to scrape the Formula 1 Drivers 2022 from the official Formula 1 website using Node.JS, Node-Fetch and Cheerio. The main reason why I chose Node-Fetch and Cheerio is simply that many people will be familiar with the syntax and both of them are very easy to use and understand.
Cheerio uses core jQuery which makes selecting elements extremely easy and if you have worked with Fetch on the front end of the web, then this would be very familiar to you. Also, I need to mention that Fetch will be bundled in Node.js in the near future so you won’t have to install it as a separate package. That’s always a plus.
Article: bit.ly/3vccvOV
☕ BuyMeACoffee: www.buymeacoffee.com/RaddyThe...
Chapters:
0:00 Introduction:
0:14 What is Web Scraping
1:09 Is Web Scraping Illegal?
1:47 Create Web Scraper
32:06 End
Credit:
Thumbnail photo Photo by Hanson Lu on Unsplash
Data: www.formula1.com
☕ BuyMeACoffee: www.buymeacoffee.com/RaddyThe...
Discounts:
⚡ Hostinger: www.hostg.xyz/aff_c?offer_id=...
⚡ Elementor: trk.elementor.com/26518
Recording Equipment:
◾ Microphone: amzn.to/3Ppp8Ok
◾ Shotgun Mic: amzn.to/3IVqIot
◾ Camera: amzn.to/3z0bxpF
◾ Lens: amzn.to/3Pw4s7d
◾ Lighting: amzn.to/3PGXvzW
Computer Gear:
◾ Keyboard: amzn.to/3PGXvzW
◾ Headphones: amzn.to/3PJl9fg
◾ Mouse: amzn.to/3z1TGPf
Connect with me:
◾ Website: www.raddy.dev
◾ Newsletter: www.raddy.co.uk/newsletter
#nodejs #nodejstutorial #cheerio

Пікірлер: 44
@camilapinzon5589
@camilapinzon5589 Жыл бұрын
Finally some explanation on how to access the specific classes. Thank you
@erichepperlewp
@erichepperlewp Жыл бұрын
Great tutorial Raddy! I especially love the step-by-step detail you give to creating a simple but powerful working web scraper project. I would like to build a news aggregator myself. I may try that as a project soon
@RaddyDev
@RaddyDev Жыл бұрын
I am glad that you like it, Eric. News aggregator sounds pretty cool. There is also Puppeteer that you can use for more complex scenarios, but it's not as friendly as Cheerio to use. Thank you for the comment!
@Santiago-ej4ph
@Santiago-ej4ph Жыл бұрын
Awesome video, thanks!
@CodeWithLakshan
@CodeWithLakshan 11 ай бұрын
Awesome tutorial. 🔥
@sadyk4ever
@sadyk4ever 2 жыл бұрын
actually what i've searched for, ty much🔥
@RaddyDev
@RaddyDev 2 жыл бұрын
🔥🔥🔥
@orlundoexplainsai
@orlundoexplainsai Жыл бұрын
Thanks for the video!
@thedevnoteyt
@thedevnoteyt 2 жыл бұрын
Fantastic tutorial 🙌🔥
@RaddyDev
@RaddyDev 2 жыл бұрын
Thank you!
@phoenixflower1225
@phoenixflower1225 Жыл бұрын
Awesome Tutorial - very detailed and so nice to learn from
@RaddyDev
@RaddyDev Жыл бұрын
Thank you! Cheers!
@fal8202
@fal8202 Жыл бұрын
Thank you for concise and simple explanation
@RaddyDev
@RaddyDev Жыл бұрын
You're welcome!
@leticianeves6977
@leticianeves6977 2 жыл бұрын
Love your videos bro!
@RaddyDev
@RaddyDev 2 жыл бұрын
It's good to hear that! Thank you
@computerscience1152
@computerscience1152 2 жыл бұрын
yeah, Awesome, Subscribed
@RaddyDev
@RaddyDev 2 жыл бұрын
Thank you!
@qusai2062
@qusai2062 Жыл бұрын
thank you so much
@RaddyDev
@RaddyDev Жыл бұрын
Welcome 😊
@AdamsViews
@AdamsViews Жыл бұрын
What happens if the website you're scraping is utilising Cloudflare? It pretty much becomes blocked straight away.
@Emma-eb5zb
@Emma-eb5zb 2 жыл бұрын
Nice, can you do a tutorial with pupeteer in node?
@RaddyDev
@RaddyDev 2 жыл бұрын
Yes of course. I will add this to the list
@Emma-eb5zb
@Emma-eb5zb 2 жыл бұрын
@@RaddyDev thanks!
@Emma-eb5zb
@Emma-eb5zb 2 жыл бұрын
@@RaddyDev Sorry if bother you, I need to make a continuous integration an deployment with GitHub actions and Heroku, can you add a tutorial of this? thank you
@ancestralconsciousness
@ancestralconsciousness 9 ай бұрын
quick question: can i setp all of this up on shared hostinger hosting? or do i need a vps or something like that?
@RaddyDev
@RaddyDev 9 ай бұрын
As long as your hosting allows you to use NodeJs, it should be fine. If you are using CPanel, you could search for NodeJs and see if the option is there.
@michaelday6987
@michaelday6987 Жыл бұрын
Is Cheerio or Puppeteer a better starting point for web scrapping? If I wanted to learn and create a usable app with?
@RaddyDev
@RaddyDev Жыл бұрын
I would say Cheerio
@noabeldoch971
@noabeldoch971 Жыл бұрын
Thank you for this amazing tutorial!
@RaddyDev
@RaddyDev Жыл бұрын
You're very welcome!
@akshayy_xd
@akshayy_xd Жыл бұрын
I get an error, handleErrorFromBinding(ctx); when trying to run app.js, any idea why?
@RaddyDev
@RaddyDev Жыл бұрын
Does it happen when you use the FS module and you try to create a folder or write a file? It could be file permissions. Read the full error and see if it says "permission denied". You could try in a different disk or folder.
@orlundoexplainsai
@orlundoexplainsai Жыл бұрын
When using span:last - I get back the first names again instead of the last names. Is there a reason why that could be?
@orlundoexplainsai
@orlundoexplainsai Жыл бұрын
Nevermind. I fixed it. I didn't save my app 😆
@RaddyDev
@RaddyDev Жыл бұрын
😆😄
@AbdulHannan-or8ql
@AbdulHannan-or8ql 7 ай бұрын
what if a website do not allows scraping? then what?
@RaddyDev
@RaddyDev 7 ай бұрын
Straight to jail. Jokes aside, you could check to see if they have an API that you can use
@user-de6um8fw9v
@user-de6um8fw9v 2 жыл бұрын
How save data in database and send notifications
@RaddyDev
@RaddyDev 2 жыл бұрын
To save the data into a database you could use a database like MySQL, MongoDB or Firebase. To be fair there are a lot of good options. I've already made a few videos on how to save data into database. You could check them out. For notifications I think that there is a Push API. I am not sure what's the best to use for that right now. I am sure that there are a ton of services that make it super easy to setup and use
@landrover1114
@landrover1114 9 ай бұрын
how to get date and time by using web scrapping
@RaddyDev
@RaddyDev 9 ай бұрын
If it's on the page, it would be the same way. If you want the current date / time you can use the JavaScript Date object. Google that, and you'll find a lot of examples and formats
@DitiGjoni
@DitiGjoni Жыл бұрын
Hello can i ask something
@RaddyDev
@RaddyDev Жыл бұрын
Sure!
Web Scraping like a GOD with Javascript
8:17
typecraft
Рет қаралды 39 М.
Web Scraping with Javascript | Node & Cheerio Tutorial 2023
5:42
Nextframe Dev
Рет қаралды 13 М.
Super sport🤯
00:15
Lexa_Merin
Рет қаралды 18 МЛН
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 31 МЛН
СҰЛТАН СҮЛЕЙМАНДАР | bayGUYS
24:46
bayGUYS
Рет қаралды 465 М.
Разбудила маму🙀@KOTVITSKY TG:👉🏼great_hustle
00:11
МишАня
Рет қаралды 3,9 МЛН
Industrial-scale Web Scraping with AI & Proxy Networks
6:17
Beyond Fireship
Рет қаралды 689 М.
Web Developer Roadmap (2024) - Everything is Changing
25:02
ByteGrad
Рет қаралды 250 М.
Node.js Web Scraping (Step-By-Step Tutorial)
12:52
Oxylabs
Рет қаралды 31 М.
Always Check for the Hidden API when Web Scraping
11:50
John Watson Rooney
Рет қаралды 594 М.
Intro To Web Scraping With Puppeteer
21:24
Traversy Media
Рет қаралды 93 М.
Learn Morgan - HTTP request logger for NodeJs
12:45
Raddy
Рет қаралды 5 М.
How to Scrape the Web using Node.JS (Puppeteer + Cheerio)
13:43
Worn Off Keys
Рет қаралды 10 М.
Super sport🤯
00:15
Lexa_Merin
Рет қаралды 18 МЛН