Coding Challenge #75: Wikipedia API

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


References:

Videos:

Related Coding Challenges:

Timestamps:
0:00 Introducing today's topic: a Wikipedia web crawler
1:17 Add an input box to the html
2:48 Handle the user input event
4:45 The Wikipedia search URL
6:45 Use loadJSON to request a page
9:52 Pick a random article title
11:36 Use a regular expression to replace the white space
12:28 Retrieve the content using the content URL
14:58 Look at the json file with the Chrome extension Json formatter
16:37 Use the key to get the page Id
19:53 Use a regular expression to get the words on a page
21:55 Use a random word to crawl a bunch of random articles
22:55 Add an exit condition
24:12 Conclusion

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

#webcrawler #wikipediaapi #regularexpressions #loadjson #javascript #p5js
Рекомендации по теме
Комментарии
Автор

This video was a boost to my self confidence. I was working with the Wikipedia API for the first time and thought I must be doing something wrong because it was so many steps. Then I found this video and thought, "Hey, it's not me, it's Wikipedia."

kmeadows
Автор

Using all those "shortcuts" but writing counter = counter + 1

NicolaiWeitkemper
Автор

1:28 : *<h1>...</h2>* - most big brain moment in the history of web development

edazpotato
Автор

9 times... (counter = 0, counter = counter + 1, counter < 10). I like you're doing little mistakes, feels more natural\not rehearsed.

devjimmy
Автор

Hey Dan, would you ever consider doing separate videos where you go into depth explaining topics that you briefly touch on in the coding challenges? For instance, jsonp, or something similar. I think it would be very beneficial to have a separate video for those that want to go in and learn the details about what you are talking about.

koetter_boater
Автор

Moral of the story:

Wikipedia programmers must watch tom Scott’s programming videos...

aryamankejriwal
Автор

12:54 that's why I don't have a beard

archie
Автор

Dear god man, you have no idea how much that probably just helped me with my a level computer science coursework!
Thankyou!

CCcrafted
Автор

hey Daniel, as always great Video! could you do an episode on the YouTube API? I think that would be fun - and also maybe go deeper into how to secure the API-Key? I really struggle a lot with this security stuff.

PianoCat-Music
Автор

This is how I use Wikipedia. I search for something about IT stuff and 2 hours later, I end on a page about "8-Oxo-2'-deoxyguanosine"

steffenderfreak
Автор

Thank you so much! I like your way of telling the code and allowing to have a mess in your thoughts, it helps to focus and see that Programmers don't have to be perfectly focused people!!!

yuliaberezina
Автор

Man I wish i had coding skills like this. I LOVE designing interfaces, but this just seems so much cooler with the right knowledge and skill

RicoGalassi
Автор

I actually like and enjoy to see your coding challenges, the way that you explaind, the way that a programmer thinks it's a cool things. Nice job in every single video. Keep it good, and stay good as always, seeing this far from a computer to start coding, lol

riguidixrodriguez
Автор

for those who cant get result from loadJSON() function with 'jsonp' parameter,
change your p5.js cdn to version 0.6.0 or eariler.
In ver0.6.1 p5 will throw an error if you try to load a json file with jsonp format. It should work then :D

jhuluan-jyun
Автор

thank you for doing these, reminding me when im stressed that coding is fun! and im proud to say I finally know enough vanilla js that I could write this, and follow what the p5 lib is doing for you, slick stuff, useful indeed.

ggcadc
Автор

Guys!
Set the playback speed at 0.5
And seek to 22:06 and enjoy the trainwreck! :)

22:06 to 22:20, I'm crying this is way too funny

QWRTYUU
Автор

Back when I tried using the wikipedia API, I sorta hated it. So convoluted for no reason.

forgoroe
Автор

It goes from "Unicorn" to "Violence in the Quran" in only 3 steps. Wow.

kevnar
Автор

you inspired me to start learning javascript and p5 !! thanks :D

flashgames
Автор

Love that first random word is just an average word.

FMpundit