And I knowas a normalcomputeruser, youcankindof, like, goon a websiteandreadinformationandsokindofThere's somuchinformationavailableontheWebandWebscrapingis a waytokindofprogrammaticallytakethatinformationoffofthosewebsitesanddowhateveryouwanttosortofparseitprogrammaticallyasopposedtoanenduserwhomightbegoingonWikipediaorGoogleinteractingwiththingstodowiththemouseisreading, youknow, information.
Sowecanmake a scripttomaybedosomeanalyticsandsortofthe U.
S.
Soifyouthinkof, like, maybethenontechwayarelikesameconceptofwebscooping, maybeyou'rereading a website, sayWikipedia, andyou'relikecopyingdownthewordsorinformationonpaper.
Andthenwedecidedtodosomethingwithpaperthatobviouslytakes a reallylongtimefishing.
Theyhave, like, a bunchofnice, uh, premadefunctionsthatyoucanusethat's gonnabequiteusingThioandoftenputthissortoflikebehindAh, like a paymentstructurenecessary, youknow?
Yeah, I useitforfreeupto a certainamountofrequestsrightwhereweasktheirserverfortheinformation, butthenpassed, maybe, like 10,000 in a certainperiodoftime.
They'relike, No, youhavetostartpayingfortheservice.
Yeah, yeah, yeah, forsure.
Wehad a coupleofnewfollowersaswell.
I'm justgonnakeepitonthispage, I thinkHerewhichwaas?
Uh, Aaliyah.
Not a castandcybervideos.
Thankyouverymuchforthefollowed.
Yeah, Sothat's kindofthemostofficialwaytointeractwithanothercompany's informationbecausethathavinganAP I kindofsignalsfromtheorganizationthat, Yes, wedowantyoutoaccessourdataormaybeuseourserviceis.
Oneexample I canthinkofismaybeyourcityorcountyhasstatisticsforyourarea.
Thatcouldbeinterestingtoanalyze.
Noneedto, likeforceit.
Whenyoutakethatfromthem, thatusuallyhavemaybe, like, take a siesta, besortofgivingyouthedatabaseupfront.
Exactly.
Yeah.
Sothesearethereasonwhy I reallywanttohighlightthesebeforewemoveforwardisbecausetheseairreallylikeofficialnotificationsoflike, thisishowwewantyoutointeractwithus.
Soalwayslookingoutforthose.
Butifmaybetherearesmallerorganization, yourpersonalblockorsomethingwheretheydon't havetheresourcestonecessarilyputtogetheran A p I orsomethingWebscrapingis a wayforyoutokindof, liketakeinitiativeandsaylike, Hey, I'm gonnastructurethishow I wantandkindofbuildthingsfromscratchandevenevenbiggerwebsitestosomebigWebsitestokeepeverythingsortofatleast a p I wised.
Youdon't reallyexposeone.
I thinkWikipediaguessingdoesn't havean a p I.
I actuallyhaven't looked.
It's probablyplentyofwebsites.
Eveniftheydo, they'reprobablyplentyofwebsitesthatdohave a tonofdatabase, a tonofdataandAndreandthechatterit's actuallypointingout.
Scriptisactuallynotlikesomethingyouwouldsee, butthat's a jobscriptscripttitlethat's actuallyinthehead.
Sothatactuallydoesn't showup, either.
Butassomethinglike a pewtag, thatwouldbe a paragraphtext.
There's H onethrough, I think h six.
I believejustdifferentstylingontheworldmightthinkthatyouactuallymadethisdiagramyourselfbecausetheytheydon't seetheattributionofthebottom.
Unfortunately, a disclaimer.
I didnotmakeanyoftheseimages, unfortunately, butit's veryitisverylovelylookingveryhelpful.
Um, okay, solet's talk a littlebitmoreabouttheobject, thetreethingthatyou'retalkingabout.
SoHumlhaskindofallthesetagssoyourbrothercanrender a certainwaylike I wassaying, butwhatbeautifulsuitdoesandotherHTMLparsinginterpretinglibraryslashprogramsdoistheysay, Hey, youknowhowyoustructureHTMLisverysimilartosomethingwhatwecall a tree.
Well, andifanybodyhasanyquestionsonwhatwe'redoingaswegoalongdifferently, askedthemthechatiscurrentlyhiddenjustbecausetheitlookslike I broughtthembackuponthescreen.
Oh, no, becauseit's a differentview.
But I hadhiddenthechatbrieflyjustbecauseitwastakingup a largepartoftheslidedeck.
Um, but, uh, sorry.
Oh, didyousendmetheslidesandJustin?
So I wonsecondeverybody.
Wegetthe I don't seethem, Elsieandjustsaid I mightbehaving a slightly, butwecangoaheadandcontinuehere.
Itshouldbe a beautifulsoupthingthatdoesstuffinstores.
Information.
Exactly.
Yeah.
Sowe'vemade a beautifulsoupobjectandwe'vecalledittouh, S O.
ThisobjectisactuallyjustonehtmltagswithIt's a boldtagandthetextisextremelyboldondso I setthattimetobeso I tookthesuitwhichishere, and I parsed.
I said, givemeparticularlythebetag, whichishappenstobetheonlytaginthere.
And I saiditequaltothisvariabletag.
Sonowif I dotag, notname, I shouldreceivethe B time.
Sonamebeingthenameofthetagif I wantthe i d ofthistag.
Andsothisiswhereyoukindofseenthedictionarycominginwhere I d is.
Theideaofthevalueforthesectionis a littleconfusing, butitmakesitnicelysortofindexherbalforusexactlylikeifyou'refamiliarwithanarray, usuallyindexmynumber.
Butin a dictionaryyoucanindexbyanythingyouwant.
Soherewehave i d anditsboldestaswecanseehereonDhe.
Thenifwegetattributes, itwillactuallyreturnus a set, or I think a dictionaryofalltheattributes.
Somaybeifwehadmoretypes, maybe a classorsomething, itwouldactuallyreturnallofthosethings, right?
Thanks.
ThioCaesar 41 10 andbeautypieOneforthefollowup.
I think I won.
Theyweregettingbetter.
So a littlemoreaboutthenavigablestringisbasically a normalpythonstring, exceptit's gotsomeaddedsearchingfunctionality.
Um, beautiful, superseeentiredocument, as I mentionedearlier, and a commentisjust a normalcollege, sonottoomuchThere.
Jingenericallyevertotalkaboutthisbutbeautifulsuitprovidesfunctionstobeabletomovealongthistreein a designatedway.
Esohere's an H twomilepageexample.
Lookskindofcomplicated.
Couldhonestlybarelyfitonthisslide.
Butjusttogiveyousomeperspective, thisistheissue.
I'm sovery, verysimple.
Thecodelookskindofcomplicated.
Youcanimaginethat, like, I don't knowwhogoesgooisn't eventhatfancylike I don't knowFacebookPagehas a lotmorehtmltaxman, butyeah, sogenetically, thisis a verysimpleHTMLpage.
Thisismeantnottobeusedinanactualwebsitethatyoudeploy, butrather, ifyou'rerunning a scriptonyourlocalmachineoron a serverorsomething, thatit's a backend, sortofusecase, notgettobedeployedinyouractualWebpage.
Yes, it's foranalyzingotherWebpages.
Yeah, maybeifyouwantedtomake, like, a webupthatdoesthat, theoreticallydothattoyou?
Yeah, yeah, buttypically, probablyonthebackend.
Lipsticksaidthankyouverymuchfortheclarification.
Also, thankyoutoperilcakesand C l prismforthe r C.
I prisonfollows.
Okay, sothat's kindofthecontentstaggedhere.
Specificallysayweonlywantedthefirstitemincontentsassomeoneastutelynoticedthatitis a list.
Sothatspecifiesthatwejustwantthetitleonandthenhere, withinthecontentsofthetitletag, isactuallythetextof I knowhowtogetthistogoaway, buttypesofthetitleitself.
Oh, okay.
Oh, therewego.
I think I mustjustwaitforyourmouthstostopmoving, I think.
Anyway, okay, sothere's alsothisideaofdescendants, andthistiesbackintotheideaofthewholeHTMLpageis a treeandyoucangoparents, Children, siblingsjustlike a familytree.
Okay, So, generally, uh, wehavedirectionsofmovingupanddownthetreecontentsandChildrenbeingmovingdownandparentandparentsveryintuitivelybeingmovingup.
Um, also, wehavewaystomovehorizontallyinthetree.
Um, so, likesiblings, exactlylikethere's a tagsifyouwantthenextsiblingornextsiblings, theonlydifferencebetweenthesingularandpluralhereisoneisgoingtoreturn a singleobject, andtheotheroneisgonnareturn a listofobjects, dependingonhowmanythereare.
Okay, soyeah, verysimilar.
Justtheotherdirection.
Previousandprevioussiblings, previouselements.
Sothat's kindofifyouwantto.
Ifyouthinkofyourselfaslike, I don't know, a bugwalkingthroughthetreeandyoucanonlyknowdirections.
That's kindofwiththesefunctions, too.
Butoftentimesyouknowexactlywhatyouwant.
Andyoucouldjustsayitlike I seethatonelike, givemethatone.
Andthat's wherewegetintosearching.
Soelementwouldbemoreforlike, inthecasewhereyouwanttodifferentiatebetween, like, a siblingelementversusmaybe, like a stylingelementorstylingtag, brother.