Published On Sep 25, 2017
In this coding challenge, I make a "Wikipedia web crawler" in JavaScript. It randomly crawls from topic to topic on Wikipedia using the API and the p5.js library. Code: https://thecodingtrain.com/challenges...
š¹ļø p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...
š„ Previous video: Ā Ā Ā ā¢Ā CodingĀ ChallengeĀ #74:Ā ClockĀ withĀ p5.jsĀ Ā
š„ Next video: Ā Ā Ā ā¢Ā CodingĀ ChallengeĀ #76:Ā 10PRINTĀ inĀ p5.jsĀ Ā
š„ All videos: Ā Ā Ā ā¢Ā CodingĀ ChallengesĀ Ā
References:
š Wikipedia API Help: https://www.mediawiki.org/wiki/API:Ma...
Videos:
š Videos on working with data and APIs: Ā Ā Ā ā¢Ā WorkingĀ withĀ DataĀ andĀ APIsĀ inĀ JavaScriptĀ Ā
š My Videos on Regular Expressions: Ā Ā Ā ā¢Ā 2.1:Ā IntroductionĀ toĀ RegularĀ Expressi...Ā Ā
š“ Coding Train Live 101: Ā Ā Ā ā¢Ā CodingĀ TrainĀ LiveĀ 101:Ā "let"Ā vsĀ "var"...Ā Ā
Related Coding Challenges:
š #84 Word Definition Chrome Extension: Ā Ā Ā ā¢Ā CodingĀ ChallengeĀ #84:Ā WordĀ Definition...Ā Ā
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
š Website: http://thecodingtrain.com/
š¾ Share Your Creation! https://thecodingtrain.com/guides/pas...
š© Suggest Topics: https://github.com/CodingTrain/Sugges...
š” GitHub: https://github.com/CodingTrain
š¬ Discord: https://thecodingtrain.com/discord
š Membership: http://youtube.com/thecodingtrain/join
š Store: https://standard.tv/codingtrain
šļø Twitter: Ā Ā /Ā thecodingtrainĀ Ā
šø Instagram: Ā Ā /Ā the.coding.trainĀ Ā
š„ Coding Challenges: Ā Ā Ā ā¢Ā CodingĀ ChallengesĀ Ā
š„ Intro to Programming: Ā Ā Ā ā¢Ā StartĀ learningĀ here!Ā Ā
š p5.js: https://p5js.org
š p5.js Web Editor: https://editor.p5js.org/
š Processing: https://processing.org
š Code of Conduct: https://github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...
#webcrawler #wikipediaapi #regularexpressions #loadjson #javascript #p5js