Тёмный

Python Web Scraping with Beautiful Soup and Regex 

Engineer Man
Подписаться 537 тыс.
Просмотров 199 тыс.
50% 1

Check out the power of Python with a demonstration of web scraping using Beautiful Soup and also some Regex.
Hope you enjoyed the video!
Check out this code here:
github.com/engineer-man/youtu...
Join my Discord server to chat with me:
engineerman.org/discord
Check out some code on my GitHub:
github.com/ebrian/engineerman
Tweet me something funny on Twitter:
/ _engineerman
Say hi over at Facebook:
/ engineermanyt
Sincerely,
Engineer Man

Наука

Опубликовано:

 

1 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 277   
@cetrusbr
@cetrusbr 5 лет назад
I like your tutorials because u go directly to the content, something rare in youtube these days...
@kalef1234
@kalef1234 5 лет назад
Hey guys what's up before we get started smash that subscribe button, like this share it i am giving away a fucking gift card follow the links to my merch watch my ads really helps thanks okay...roll that intro *45 second intro*
@sourabhch3044
@sourabhch3044 3 года назад
So true thank you for putting out the points which matters.
@mixalismcgamer3188
@mixalismcgamer3188 4 года назад
Dude i watched over 15 videos+ that was recommended and after hours i found this FULLY EXPLAINED.
@kalef1234
@kalef1234 5 лет назад
I felt so powerful as soon as I pulled an array of strings from a random website. Thank you for your great tutorial
@xrefor
@xrefor 4 года назад
Love this presentation. Straight to the point with short and specific explanation. Keep it coming! :)
@dilshand.5127
@dilshand.5127 5 лет назад
I was able to do this on another leaderboard site, appreciate your work here.
@impossible441
@impossible441 5 лет назад
This is remarkable, very informative and down to the earth - I really love this concise format of yours which is rather contradictory to what most of ppl on yt are providing
@dallaskappel1
@dallaskappel1 5 лет назад
Hey man! I watched this and applied the concepts to a weather site and made a csv of all the sunset / sunrises in 2019! Thank you! Please I love the way you explain things keep making videos sir! I have applied your teaching in a couple videos and it’s great! Learning so much!
@PS3PCDJ
@PS3PCDJ 2 месяца назад
This is THE best beautifulsoup tutorial on the internet.
@yanggao4878
@yanggao4878 3 года назад
Your videos are fast-paced and straight to the point. Thanks!
@clownboy84
@clownboy84 4 года назад
Thanks for the video. I like how you take the basics and break it down with really good and practical examples.
@robertpearson2143
@robertpearson2143 5 лет назад
Been doing something similar for a while but in a much more complicated way. Looking forward to making my life much easier. Thank you!
@zigginzag584
@zigginzag584 4 года назад
It helps so much to have someone that matches your personality when learning stuff. I can't stand when asking someone for instructions on how to do something and they tell me everything that I can expect and every once i a while throw in the thing I'm supposed to do next. None of the fluff here. Just context. Every other creator would/has made this subject a 45min+ video but here I am feeling proficient after just 14 minutes with EM. Thank you, Sir!
@EngineerMan
@EngineerMan 4 года назад
You're welcome buddy!
@Lu3ck
@Lu3ck 4 года назад
Your videos are fast but glorious! Love your content man! Thank you! Bless 🙏
@enyoc3d
@enyoc3d 5 лет назад
in a sea of youtube tutorials yours is the pearl. thanks!
@SusiEzhil
@SusiEzhil 5 лет назад
wow.. thats the crisp explnation,,, you're the man!!
@bhumikakhiyani4230
@bhumikakhiyani4230 3 года назад
I was struggling to navigate to iterate through second span tag in multiple td tags I.e. (tr[1:]/td[0]/span[1]) I was trying it the whole day. This is the best tutorial I have seen. Thank youuuuu.
@stephenrochester6309
@stephenrochester6309 5 лет назад
These videos are brilliant. Thanks for all your hard work.
@ViniciusProvenzano
@ViniciusProvenzano 3 года назад
Real Nice content! Straight to the point. I’ve played around with beautiful soup a few years ago for an small project, and I just wish this video was around at the time....
@TomSilver_42
@TomSilver_42 3 года назад
Simply brilliantly explained. I have seen few of your videos and I like your style, therefore You have earned another subscriber.
@JinmyOyengtangmeng
@JinmyOyengtangmeng 5 лет назад
If only I had this tutorial a few years back. Good stuff.
@ledosilverknight4619
@ledosilverknight4619 5 лет назад
Some of the best tutors are always straight-forward: down and dirty!
@PriZ0nM1ke
@PriZ0nM1ke 5 лет назад
Wow these videos are awesome! Direct and concise but understandable!! Well done!
@worsethanjoerogan8061
@worsethanjoerogan8061 5 лет назад
Dude you're helping me out immensely with computer science courses
@ladyViviaen
@ladyViviaen 3 года назад
was trying to scrape modarchive for my project, this is way better than writing the name and id down by hand lmao, thank you!
@axelcano1623
@axelcano1623 5 лет назад
Really nice content! You explain just enough to be clear but not too much that's perfect. Please continue to remind the type of the elements you create, it's very important for beginners.
@rustyelectron
@rustyelectron 5 лет назад
This video is really a good intro to web scraping.
@qettyz
@qettyz 5 лет назад
These were really good examples, thank you!
@susbedoo
@susbedoo 5 лет назад
You are the coolest tech guy I have ever seen on RU-vid
@kennethmcquade4341
@kennethmcquade4341 5 лет назад
You're definitely skilled! For anyone watching these videos, don't get discouraged, this takes time. @Engineer Man , Can you talk about the experience of learning how at the beginning of your videos?
@johnbecker3116
@johnbecker3116 5 лет назад
I spent forever teaching myself this last week and now you post this. Kill me now
@chrisabreu7469
@chrisabreu7469 5 лет назад
your videos are a life saver man. keep up the great content
@Omar-ic3wc
@Omar-ic3wc 4 года назад
Exactly what I needed thank you very much!!
@arturmangabeira9990
@arturmangabeira9990 5 лет назад
EM you're awesome. i was studying web scraping and this come up. subscribed yesterday to your channel! lol
@EngineerMan
@EngineerMan 5 лет назад
Nice!
@DirtySocrates
@DirtySocrates 5 лет назад
Excellent! Thank you!! Great vid!
@oromis995
@oromis995 3 года назад
This content is absolute gold.
@luis96xd
@luis96xd 3 года назад
Wow, I liked this video so much! It was very useful! 😄 You really have helped me a lot, it was well and fully explained, with real life examples Thank you so much for this tutorial! 👏👏
@DevastaingDj
@DevastaingDj 5 лет назад
Awesome! Kudos! Very helpful. Thanks man!
@justinhamilton8647
@justinhamilton8647 2 года назад
Cheers man i used this tutorial to sort through 310000 embed links you’re so awesome
@royslapped4463
@royslapped4463 2 года назад
this is perfect for what I needed thank you!
@kurdmajid4874
@kurdmajid4874 3 года назад
he makes it so quick and simple
@K2ThaYo
@K2ThaYo 5 лет назад
Beautiful video man! Really valuable information here. As a sysadmin with over 10 years experience, I can state its really clean method of scraping. I was used to use bash scripts for everything but using libraries in python is sooo helpful. It would be a pain in the as in bash with awk, grep, etc. I hope to see more soon
@sgttye
@sgttye 5 лет назад
Keep up the good work man!
@stefandevos1520
@stefandevos1520 5 лет назад
love your tutorials man
@BrettKromkamp
@BrettKromkamp 5 лет назад
Excellent tutorial. Thanks.
@estilen69
@estilen69 5 лет назад
Using CSS selectors is the way to go, gets rid of nested for loops and is more robust.
@matteomannini1205
@matteomannini1205 3 года назад
how?
@blevenzon
@blevenzon 5 лет назад
Wow just found your channel by accident and I’m loving it. Awesome content!! Do you think you can do a vid on Elastic Stack?
@asdfasdfasdf383
@asdfasdfasdf383 3 года назад
You go straight to the point. Obviously, you know a lot more in-depth about this topic. Anyway, I like it.
@luis96xd
@luis96xd 5 лет назад
This is excellent! Well explained! :D
@kylemichaelreaves
@kylemichaelreaves 3 года назад
Super helpful, thank you.
@kristiyangerasimov6708
@kristiyangerasimov6708 3 года назад
Great video. Stuff like that makes me want to program and develop software until i die.
@ddmin3082
@ddmin3082 5 лет назад
Awesome video! Can you do one on the requests module please?
@legioner304
@legioner304 5 лет назад
3 searches in the loop - very dirty ) "The speed of software halves every 18 months"
@poidog22
@poidog22 5 лет назад
great stuff, thank you for this.
@xppaicyber3823
@xppaicyber3823 4 года назад
Great content
@treybailey6752
@treybailey6752 5 лет назад
Great vid with fantastic content. Would love to see this where you first login in order to get content. Getting the headers set is a challenge.
@EluviumMC
@EluviumMC 5 лет назад
Using Selenium to do the site navigation to get you logged in is how I worked around getting into a site that requires login credentials prior to scraping.
@johanneszwilling
@johanneszwilling 5 лет назад
😎👍🏼 Thank you, Sir!
@jeuxdeau2009
@jeuxdeau2009 5 лет назад
I love your page man.
@daltonkraklan2257
@daltonkraklan2257 Год назад
This was so freaking helpful
@KhalilYasser
@KhalilYasser 3 года назад
Amazing. Thanks a lot.
@daru3450
@daru3450 5 лет назад
Love your content!
@socksincrocks4421
@socksincrocks4421 4 года назад
Thank you for your video. Awesomesauce
@grantfaith
@grantfaith 3 года назад
ty, saved me an hour of time from all these other videos. holy shit
@zigabrus
@zigabrus 3 года назад
Top explanation, tnx!
@mhalton
@mhalton 2 года назад
13:52 Happiest man!
@EngineerMan
@EngineerMan 2 года назад
Oh god I'm not gonna be able to unhear that any time soon.
@JeroenTrappers
@JeroenTrappers 5 лет назад
Good video. Personally, i like using node with dom module and write css queries to extract what i want.
@laurentthiol
@laurentthiol 5 лет назад
Whaou! Amazing!!! many thanks
@mirusvet
@mirusvet 5 лет назад
Thank you thank you!
@xwinglover
@xwinglover 3 года назад
Great video. Great channel
@ChrisAthanas
@ChrisAthanas 3 года назад
Thank you for a very clear
@Viruhemanth
@Viruhemanth 5 лет назад
carefully he's a hero
@EluviumMC
@EluviumMC 5 лет назад
Happy that you've chosen this topic. I've been exploring web scraping and have a script that works pretty well on a site that I frequent. Another awesome tool that can be used to also automate web navigation is the selenium package. But on more of a question-related note, I know the script you just made was pretty simple, and the one I have isn't that complicated, but I've been wondering how one would go about writing an object-oriented script for scraping?
@UchihaAditya
@UchihaAditya 5 лет назад
What are the advantages of selenium over Beautiful Soup?? I have a web-scraping assignment now and was advised to use selenium.
@EluviumMC
@EluviumMC 5 лет назад
Selenium can be used as a web scraper, but I use it more for web navigation and then use beautiful soup to actually get the data I need from the pages once they've been navigated to. I just find beautiful soup to be a more intuitive for extracting the data.
@yixunnnn
@yixunnnn 5 лет назад
With selenium it is like an automated user, and when you use it, you require a web driver, and you can choose if you want the automated browser to run in the background or not. I recently used selenium because I was trying to request for content behind a microsoft login page, which is loaded using javascript, thus I needed to wait till the content was actually loaded finish before i submit anything. Unlike requests, which instantly retrieves the page content.
@KeithBalante
@KeithBalante 5 лет назад
Love this vid
@bennieliu3261
@bennieliu3261 5 лет назад
Awesome tutorial man! Can I suggest scraping dynamic pages as the next tutorial. Would be a sweet follow up
@EngineerMan
@EngineerMan 5 лет назад
Thanks. Part 2 of this is being requested a lot, I need to see what is best to do.
@LarsHolmVV46
@LarsHolmVV46 4 года назад
That was beautiful not to say absolutely excellent. Man ,,,,,
@trithuckhoahoc
@trithuckhoahoc 5 лет назад
thanks man
@andriybortnik8310
@andriybortnik8310 5 лет назад
This is an awesome video, I actually enjoy the in depth walk through of what your reasoning behind writing code is, step by step. Versus just saying " I did this" and not really explaining anything. On a separate note , I'm looking to get into python, and I have previous code development experience, but It's been a little while, and setting up an environment to start doing some coding is a bit daunting. I'm looking to do more on the machine learning , neural networks side of things. I don't struggle with any of the logic, mathematics, but I know there are many pros/cons of various IDE's . Some have better support for various packages , etc.. I was wondering if you could either make a video on some of this information, or maybe throw a few pointers my way. I would really appreciate that. Otherwise, keep up the great content!!!
@KingEbolt
@KingEbolt 5 лет назад
Let me throw some pointers at you. 0x3A738216 0x6B321970 0x88AC172B
@EluviumMC
@EluviumMC 5 лет назад
I've found that I really like using Microsoft's VS Code (not to be confused with Visual Studio). The IDE has a good clean interface, lots of extension support, and a built-in terminal.
@andriybortnik8310
@andriybortnik8310 5 лет назад
@@KingEbolt I can't even get mad at that... Well done
@camaulay
@camaulay 5 лет назад
@@EluviumMC +1 VS Code, switched from Sublime
@tobiashelbing1233
@tobiashelbing1233 5 лет назад
Awesome
@supalistmain4882
@supalistmain4882 5 лет назад
@Engineer Man , what is your day job? And how did you get into coding? Do you have a CS degree? and.... well instead of more questions, rather just ask whats your background (ito what lead to you adding so much value with these vids)?
@mohamedmusleh8720
@mohamedmusleh8720 5 лет назад
keep up the hard work :)
@magicyvan
@magicyvan 2 года назад
loved it ! Efficiency and very clear for a beginner. Would be great to have the login part, and why not sending the extraction into a csv file ;) I subscribe ;)
@bakyayita
@bakyayita 5 лет назад
Thank you..!!
@laxlyfters8695
@laxlyfters8695 5 лет назад
Went through a 30 second hillshire farms ad. Great match youtube
@EngineerMan
@EngineerMan 5 лет назад
Google knows you're into web scraping and sliced turkey lol.
@laxlyfters8695
@laxlyfters8695 5 лет назад
Engineer Man no lie came back and got an ad for $3 jack box munchie meals. RU-vid thinks your fans are stone while watching your videos
@DrSarge37
@DrSarge37 5 лет назад
It would be cool to see how to deal with pagination. So you want data from /page=1, /page=2 etc. Etc.
@joefagan9335
@joefagan9335 4 года назад
In your browser go to next page and copy the url of, say, page 2 and go to last to find the last page url. Use that as a template to build the url of each page you want. Loop over them in turn.
@joefagan9335
@joefagan9335 4 года назад
John Keymer nope you’re not parsing the page a second time to find the next button. You scrape the current page and then grab the neat page by creating the string for the next url and accessing the next page - just one grab per page.
@kingseekerbackup3085
@kingseekerbackup3085 3 года назад
I use requests and bs4. Never thought of using regex besides pattern searching
@user-jw5qm7zp9x
@user-jw5qm7zp9x 5 лет назад
so practical tutorial.. I love how you teach people
@siloenoah
@siloenoah 5 лет назад
Teach me your ways
@JoseGarciam4t0n
@JoseGarciam4t0n 5 лет назад
Hey, I really love your videos man! How about elements within elements, so for example `this link is in a paragraph`. How would you approach that?
@EnglishRain
@EnglishRain 4 года назад
I love you man
@TheEndermanMob
@TheEndermanMob 3 года назад
How does he knows a lib for everything? i'am addicted to his videos.
@donaldandmijung
@donaldandmijung 2 года назад
great tutorials! do you have a tutorial on scraping with a function( ) using beautiful soup
@SiegeX1
@SiegeX1 5 лет назад
Can you go over an example that first requires you to login and then requires you to use a query string with a hash token that changes after every login?
@NokiaN8Guides
@NokiaN8Guides 5 лет назад
thank you so much for this amazing tutorial, i would like to ask what do we do if the site i want to scrap require to be logged in btw this got recap
@joefagan9335
@joefagan9335 4 года назад
Usually, you can login first. Leave it open in your browser and scrape away.
@jokerhacker7863
@jokerhacker7863 5 лет назад
you are the best so i subscribed your chanel
@yearoflinux
@yearoflinux 4 года назад
Cool
@chowfatt38
@chowfatt38 5 лет назад
Great video again. I've been playing web scraping a while and I find that most of websites nowadays using javascript rendering quite heavy. Will you make a part 2 for talking about how to web scrape javascript rendering website? And what do you think about another web scraping package, Scrapy? thanks Man
@poidog22
@poidog22 5 лет назад
This would be a great follow on. +1
@cruzab3153
@cruzab3153 5 лет назад
Selenium is good and easy....
@trailrider6844
@trailrider6844 5 лет назад
+2
@tayfun6378
@tayfun6378 4 года назад
puppeteer does a good job these days I think
@Megaloplex
@Megaloplex 3 года назад
+100
@MrFrondoso
@MrFrondoso 2 года назад
Génial. Dieu sait que je galère à utiliser BSoup . Et là j'ai l'impression d'avoir enfin compris.
@alfredleppanen6796
@alfredleppanen6796 3 года назад
Hey great video! Lets say in your last leaderboard example, I would like to get notified when the leaderboard has changed, so to say when something changed on the site. I have built a script where I can see the HASH change, but I cant output what actually changed on to website, do you have any tips to how to monitor what actually changed on the website?
@zenmaster24
@zenmaster24 5 лет назад
awesome vid! :D how would you do it with a site you need to be logged in to?
@dralexhunter
@dralexhunter 5 лет назад
Can you do a video showing the interactions between sessions and bs4?
@Ashesoftheliving
@Ashesoftheliving 5 лет назад
Hey E-man Great video! I wanted to ask you this. You said that "you have to know the structure of html before doing scraping from websites" which is true but I need to create a process where I can search a keyword or basically a word on multiple websites and get the content out of those websites. Now from this content, I will create a sentiment value and generate a newsfeed in my application with a sentiment value in it. Can you suggest a way I can do that? Thanks in Advance
Далее
Beautiful Soup 4 Tutorial #1 - Web Scraping With Python
17:01
Web Scraping Basics in Python
19:48
Просмотров 19 тыс.
I Built a SECRET Soccer Field in My Room!
24:15
Просмотров 12 млн
1❤️
00:17
Просмотров 4,5 млн
Engineer Breaks Down Hollywood Programming Scenes
11:02
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 793 тыс.
How To Scrape (almost) ANY Website with Python
13:45
Просмотров 37 тыс.
iPhone 16 - БЫСТРЕЕ И НАДЕЖНЕЕ
3:57
Просмотров 29 тыс.
Улучшил свои Apple Watch!
0:25
Просмотров 25 тыс.