Coding Challenge #75: Wikipedia API

Описание к видео Coding Challenge #75: Wikipedia API

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

Комментарии

Информация по комментариям в разработке