Skip to content

Instantly share code, notes, and snippets.

@k5cents
Created June 19, 2019 18:05
Show Gist options
  • Save k5cents/590eeab6835302e196dcb5c44744a514 to your computer and use it in GitHub Desktop.
Save k5cents/590eeab6835302e196dcb5c44744a514 to your computer and use it in GitHub Desktop.
Extracting the second letter from every ninth word in the Hello Internet (Last Jedi) Christmas Special
pacman::p_load(tidyverse, tidytext)
read_html("http://podcastsearch.david-smith.org/episodes/2003") %>%
html_nodes("p") %>%
html_text() %>%
str_squish() %>%
str_trim() %>%
str_remove("◼ ► ") %>%
enframe(NULL, "line_text") %>%
rownames_to_column("line_no") %>%
unnest_tokens(word, "line_text") %>%
slice(seq(1, nrow(.), by = 9)) %>%
mutate(letter2 = str_sub(word, 2, 2)) %>%
pull(letter2) %>%
str_c(collapse = "")
otaenhooshhoahohhorehailbohhneholotztttnttotoohoanihhlulooaeailefhohiuifinnofaohuitaihihgonyoynhhnooeeeafnshhhhuieearbohayeaamunoahoruhnonaaettraeohehatyoaheuotheoehofaohvooiovhynhaseymvnahrbeoueaeiuieonftyhyioinhueaanahoennedhehernvouonnroohpesayoafholoohaeiohiehsohfnnfhetnnohhosneeotroaeoiriafoeethiteewuttaanaiofihfftomihexai''norehosiephhnupoieaihihoiioooaanthyenhuiuhhex'hnhosahohrehovhaeveaaptehwaoovheovhnnrteehweonstulhtnoumirnneoosiiaoothsoieaienutnhliuohnneehateiaiethooitahhssleinhooihkaheifeehehwunaotfhiuhenevotahttngneiheiiohsleeahhoiohrnnnnhehbhhtiuhoiurhiahhiiauaauhinhashioowamnaoeaokoiihoahofoafyhioaihttaiteftohhoheaeyheoiiiihhhveintpohhnehiuhhhsauhha0euelsaouieofnoouuihohaoorauksohthsneehrhenfpiorhinnaheaonohohhfpfeiulhoueaiehkwtwemntbkhanahiheitialhhoouutrheiaeohoenaptrnionnohheuouihooihrefnhhaeoaasoeiehheteohyeeiirabeeonssesonlhnniooeeoohftyeanhuoieiohniaehiohiaeuhaoteuiroheaauaabhuroaaauoadeiaihehheioeohohhyonahoh'eie'soishfhulhopfhohihhasahoootsorhooietiaiuulehoaofmsehaohnhehaaenhnefthhoohhaehheeaonrneentthotiheta'ahheipehehskonoeciahoaqoahpnloaoratnniohhhohaiohahupeohthohfoeiuoshhnmhnbnvhheaeoest8thooehhvhntahhhieiuhheraihroofrhioeooniohefthaotoeseohthhieeaheoiecbutahmlteaehlihhohiapenhondptsenehnooauoah0toavoaooshumheenihhuoaoteeeehalhhstkhioorilhflnunehovhnohiohhrhhtiheeihieaauooshonohoehhaeesnrbiiiohalooheiwuonooxianiitihdelniavlofrnsiahhhohhhssfelhohibharwhahaelorhhnrpvhhsuoetiloeoeh'tronoiaioheooierhhiehanobierihhhetesieahltrfuhaoaohhyht'pehuofnhroanohhiuuhhharonotbstonnhhhioieteoiuheathiienhfhnuhhorohfianihheoohhhlo2holuhhryuuhtowhsnuribiooorpoheeonthiearhathuoohhnohiaeareovusthoaofaohinf2uobelosriooihehhiiuoonemeoeiuaoseeoeeeihlehorinoio2ueunhnbahhiiiiihiaieofhtiuioeehyhlhnsoeohemnknsnoitnt'hhohniranfnhnhohrhtanbniohonoeiointhhehoiaoeeriuulronoohiineioeaeyiasrnoonsihhnirautehhatioouoanhotovnxehnhsnfonnoiheoaoooahiuunaaohuinnphlohbeanineehhooihihotcaemuriahohoetaiihhaieuirtonoooleuieolhiehhonoohlheeenhoocovlahnehlththhlhaneooohhanohhnhooodhnoahhunrshudeooooiieashehaoohnnenouptoitrhetnhnoeruoioooonhieofoisiooauhuhaaueuehgiuianoanaouhinshoarneooooseihhuoioonhtnaeyeehnoperoxeoyuasisbhuoahglohehhiethoatnnnieiniihhonuftaieoofeauvmtyoeihehianioshiefeohonliihffeihomueeheniriinhinuhoiegieaeoihitihrxhohnohhneuinhnnnfeuplhhpisehateoeeheirnetnnhoohhneahheiulotannnoaaloneihohineaahienoofoonnonvohnuaiaunohoanneahotiar'ash'iohcnaahhhonafiateuaohnihhetoatioeunooourtoeohnbooahnniehshsenohohoyncrhhhhhtrmhohhiruofrnohohur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment