title
Coding Challenge #75: Wikipedia API

description
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/75-wikipedia-api 🕹ī¸ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/A4u07unm5 đŸŽĨ Previous video: https://youtu.be/E4RyStef-gY?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH đŸŽĨ Next video: https://youtu.be/bEyTZ5ZZxZs?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH đŸŽĨ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH References: 🌐 Wikipedia API Help: https://www.mediawiki.org/wiki/API:Main_page Videos: 🚂 Videos on working with data and APIs: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YxDKpFzf_2D84p0cyk4T7X 🚂 My Videos on Regular Expressions: https://www.youtube.com/watch?v=7DG3kCDx53c 🔴 Coding Train Live 101: https://youtu.be/PQwfop4bewM?t=5024s Related Coding Challenges: 🚂 #84 Word Definition Chrome Extension: https://youtu.be/GWDx1GnxhOw 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/passenger-showcase-guide 🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box 💡 GitHub: https://github.com/CodingTrain đŸ’Ŧ Discord: https://thecodingtrain.com/discord 💖 Membership: http://youtube.com/thecodingtrain/join 🛒 Store: https://standard.tv/codingtrain 🖋ī¸ Twitter: https://twitter.com/thecodingtrain 📸 Instagram: https://www.instagram.com/the.coding.train/ đŸŽĨ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH đŸŽĨ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA 🔗 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-of-Conduct This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new #webcrawler #wikipediaapi #regularexpressions #loadjson #javascript #p5js

detail
{'title': 'Coding Challenge #75: Wikipedia API', 'heatmap': [{'end': 123.816, 'start': 100.971, 'weight': 0.8}, {'end': 303.414, 'start': 282.962, 'weight': 1}, {'end': 387.874, 'start': 327.573, 'weight': 0.951}, {'end': 512.525, 'start': 488.547, 'weight': 0.981}, {'end': 1342.498, 'start': 1309.868, 'weight': 0.723}], 'summary': 'Covers using wikipedia api for text projects and games, creating user input box in html, data retrieval, handling cors in javascript, javascript callbacks, and wikipedia data analysis, providing examples and practical demonstrations for each topic.', 'chapters': [{'end': 39.025, 'segs': [{'end': 49.757, 'src': 'embed', 'start': 16.901, 'weight': 0, 'content': [{'end': 23.802, 'text': "There's a lot of interesting things you could do if you can get access to the contents of Wikipedia.", 'start': 16.901, 'duration': 6.901}, {'end': 27.543, 'text': 'You can make poetry machines and all sorts of experimental text things.', 'start': 24.142, 'duration': 3.401}, {'end': 33.344, 'text': 'But one thing I know that people have done effectively is make games that you can play by sort of crawling and moving around Wikipedia.', 'start': 28.163, 'duration': 5.181}, {'end': 36.625, 'text': 'And there are lots of interesting examples about that.', 'start': 34.624, 'duration': 2.001}, {'end': 39.025, 'text': 'I was looking at the chat.', 'start': 36.645, 'duration': 2.38}, {'end': 49.757, 'text': "So what I'm going to attempt to do I think is create a sketch where I'm going to say user input.", 'start': 39.385, 'duration': 10.372}], 'summary': 'Accessing wikipedia content can lead to creating games and experimental text projects, and there are numerous examples of this.', 'duration': 32.856, 'max_score': 16.901, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj1816901.jpg'}], 'start': 1.613, 'title': 'Wikipedia api for text projects and games', 'summary': "Discusses the potential of using the wikipedia api for creating experimental text projects and games, highlighting the possibilities of accessing wikipedia's contents and the examples of games made using this method.", 'chapters': [{'end': 39.025, 'start': 1.613, 'title': 'Wikipedia api coding challenge', 'summary': "Discusses the potential of using the wikipedia api for creating experimental text projects and games, highlighting the possibilities of accessing wikipedia's contents and the examples of games made using this method.", 'duration': 37.412, 'highlights': ['Creating games by crawling and moving around Wikipedia is an effective use of the API, with various interesting examples available.', "Accessing Wikipedia's contents allows for the creation of poetry machines and other experimental text-based projects."]}], 'duration': 37.412, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj181613.jpg', 'highlights': ['Creating games by crawling and moving around Wikipedia is an effective use of the API, with various interesting examples available.', "Accessing Wikipedia's contents allows for the creation of poetry machines and other experimental text-based projects."]}, {'end': 240.418, 'segs': [{'end': 61.486, 'src': 'embed', 'start': 39.385, 'weight': 0, 'content': [{'end': 49.757, 'text': "So what I'm going to attempt to do I think is create a sketch where I'm going to say user input.", 'start': 39.385, 'duration': 10.372}, {'end': 51.478, 'text': "I'm going to create a little user input box.", 'start': 49.777, 'duration': 1.701}, {'end': 57.663, 'text': "And I'm going to say user input equals, I'm going to use the p5 function create input.", 'start': 53.5, 'duration': 4.163}, {'end': 61.486, 'text': 'So now we should, if I go to the code, we should have a nice little input box.', 'start': 58.283, 'duration': 3.203}], 'summary': 'Creating a sketch with user input using p5 function create input.', 'duration': 22.101, 'max_score': 39.385, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj1839385.jpg'}, {'end': 123.816, 'src': 'heatmap', 'start': 86.828, 'weight': 2, 'content': [{'end': 90.97, 'text': 'but have a more creative mind to make something more interesting and exciting.', 'start': 86.828, 'duration': 4.142}, {'end': 92.091, 'text': "So I'm going to say.", 'start': 91.35, 'duration': 0.741}, {'end': 100.27, 'text': "word, and then I'm going to say input id equals user input input.", 'start': 93.482, 'duration': 6.788}, {'end': 105.936, 'text': 'So I prefer to put the elements that I want on the web page in HTML.', 'start': 100.971, 'duration': 4.965}, {'end': 111.623, 'text': 'So now what I can do instead of this, I can say select.', 'start': 107.398, 'duration': 4.225}, {'end': 116.712, 'text': "So I'd rather just select it.", 'start': 115.151, 'duration': 1.561}, {'end': 119.693, 'text': "And now we have access to what's written in it.", 'start': 117.052, 'duration': 2.641}, {'end': 123.816, 'text': 'And so what did I do? Did I do something wrong? Input.', 'start': 120.854, 'duration': 2.962}], 'summary': 'Discussion about using html elements and selecting input.', 'duration': 32.865, 'max_score': 86.828, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj1886828.jpg'}, {'end': 212.407, 'src': 'embed', 'start': 161.079, 'weight': 1, 'content': [{'end': 174.629, 'text': "You can worry about that when you redo what I do and now I'm just going to write a function and I'm going to call it Go wiki And the first thing that I want to do is just get what is in that.", 'start': 161.079, 'duration': 13.55}, {'end': 186.038, 'text': "So first, I'm going to say let word or term or something, term equal user input dot value, console dot log term.", 'start': 175.049, 'duration': 10.989}, {'end': 188.941, 'text': "I don't know what I just did there, but OK.", 'start': 186.619, 'duration': 2.322}, {'end': 194.577, 'text': 'OK, so again, this is my sort of friendly style of writing JavaScript.', 'start': 190.495, 'duration': 4.082}, {'end': 197.359, 'text': "You could do this in 15 different other ways, but that's what I'm going to do.", 'start': 194.597, 'duration': 2.762}, {'end': 202.022, 'text': "The other thing I'm going to do is I'm just going to add rainbow in here.", 'start': 197.379, 'duration': 4.643}, {'end': 203.662, 'text': "So oops, that's not right.", 'start': 202.642, 'duration': 1.02}, {'end': 207.965, 'text': 'I guess I say value equals rainbow.', 'start': 204.263, 'duration': 3.702}, {'end': 210.366, 'text': "So it's in there.", 'start': 209.826, 'duration': 0.54}, {'end': 212.407, 'text': 'And then changed of null.', 'start': 210.426, 'duration': 1.981}], 'summary': "Writing a function in javascript, handling user input and adding 'rainbow' value.", 'duration': 51.328, 'max_score': 161.079, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18161079.jpg'}], 'start': 39.385, 'title': 'Creating user input box in html', 'summary': "Demonstrates creating a user input box in html using p5 function create input and handling user input events, aiming to inspire viewers to explore more creative and exciting possibilities. it also discusses writing javascript and user input, including adding 'rainbow' as a value and dealing with user interaction.", 'chapters': [{'end': 188.941, 'start': 39.385, 'title': 'Creating user input box in html', 'summary': "Demonstrates creating a user input box in html using p5 function create input and handling user input events, aiming to inspire viewers to explore more creative and exciting possibilities. the function 'go wiki' is created to retrieve and log the user input value.", 'duration': 149.556, 'highlights': ['The chapter demonstrates creating a user input box in HTML using p5 function create input and handling user input events.', "The function 'Go wiki' is created to retrieve and log the user input value.", 'The presenter encourages viewers to explore more creative and exciting possibilities with the user input box.']}, {'end': 240.418, 'start': 190.495, 'title': 'Javascript writing and user input', 'summary': "Discusses writing javascript and user input, including adding 'rainbow' as a value and dealing with user interaction, highlighting the preference for a button or submit option.", 'duration': 49.923, 'highlights': ["The chapter discusses writing JavaScript and user input, including adding 'rainbow' as a value and dealing with user interaction.", 'The preference for a button or submit option for user interaction.', 'The variety of ways to write JavaScript.']}], 'duration': 201.033, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj1839385.jpg', 'highlights': ['The chapter demonstrates creating a user input box in HTML using p5 function create input and handling user input events.', "The chapter discusses writing JavaScript and user input, including adding 'rainbow' as a value and dealing with user interaction.", 'The presenter encourages viewers to explore more creative and exciting possibilities with the user input box.', "The function 'Go wiki' is created to retrieve and log the user input value.", 'The preference for a button or submit option for user interaction.', 'The variety of ways to write JavaScript.']}, {'end': 433.435, 'segs': [{'end': 303.414, 'src': 'heatmap', 'start': 260.524, 'weight': 0, 'content': [{'end': 267.608, 'text': 'So now, the first thing I want to do is look for a list of articles with that term in it.', 'start': 260.524, 'duration': 7.084}, {'end': 274.819, 'text': "So I've already done the research about the Wikipedia API and how it works.", 'start': 268.777, 'duration': 6.042}, {'end': 277.62, 'text': 'Normally, in these coding challenges, I like to kind of figure that out.', 'start': 275.339, 'duration': 2.281}, {'end': 282.582, 'text': 'But I have to admit, the Wikipedia API documentation is a bit difficult to read.', 'start': 277.64, 'duration': 4.942}, {'end': 283.622, 'text': 'But here it is.', 'start': 282.962, 'duration': 0.66}, {'end': 284.982, 'text': 'And I can see this.', 'start': 283.642, 'duration': 1.34}, {'end': 286.983, 'text': "This is basically what I'm using here, I think.", 'start': 285.002, 'duration': 1.981}, {'end': 291.485, 'text': 'This URL tells to send you the content of a page.', 'start': 287.623, 'duration': 3.862}, {'end': 294.906, 'text': "But there's also a URL to do a search.", 'start': 291.805, 'duration': 3.101}, {'end': 297.607, 'text': 'So you can look through and read all about how to do this.', 'start': 295.166, 'duration': 2.441}, {'end': 302.292, 'text': "But I'm actually just going to, I already have a URL right here.", 'start': 298.447, 'duration': 3.845}, {'end': 303.414, 'text': 'This is for a search.', 'start': 302.533, 'duration': 0.881}], 'summary': 'Researching wikipedia api for articles, finding search url, struggling with documentation', 'duration': 24.458, 'max_score': 260.524, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18260524.jpg'}, {'end': 387.874, 'src': 'heatmap', 'start': 327.573, 'weight': 0.951, 'content': [{'end': 330.076, 'text': "I'm going to go all the way to the end and close the quotes.", 'start': 327.573, 'duration': 2.503}, {'end': 338.715, 'text': "I'm going to take that out, because what I want to do is have an end, and then I want the search term to form dynamically.", 'start': 331.912, 'duration': 6.803}, {'end': 346.938, 'text': "So I'm going to say let URL equals search URL plus term.", 'start': 339.355, 'duration': 7.583}, {'end': 351.56, 'text': "So let's just console log that URL to see that that's working.", 'start': 347.578, 'duration': 3.982}, {'end': 354.043, 'text': 'There we go.', 'start': 353.643, 'duration': 0.4}, {'end': 355.664, 'text': "So now you can see that's the full URL.", 'start': 354.283, 'duration': 1.381}, {'end': 356.785, 'text': "It's searching for rainbow.", 'start': 355.704, 'duration': 1.081}, {'end': 363.61, 'text': "And that's dynamic, because if I were to put in here unicorn and hit Enter, now I'm going to get unicorn.", 'start': 357.045, 'duration': 6.565}, {'end': 366.852, 'text': "So the first thing that I want to do is just sort of see what's in that.", 'start': 363.85, 'duration': 3.002}, {'end': 370.734, 'text': 'I just want to copy this URL.', 'start': 368.513, 'duration': 2.221}, {'end': 372.636, 'text': 'And I want to look at it.', 'start': 371.735, 'duration': 0.901}, {'end': 374.357, 'text': "I didn't get it.", 'start': 372.656, 'duration': 1.701}, {'end': 378.947, 'text': 'I probably could just click on it instead of copying it.', 'start': 376.745, 'duration': 2.202}, {'end': 380.288, 'text': "But I'm going to put it in here.", 'start': 379.347, 'duration': 0.941}, {'end': 387.874, 'text': "And look, this is the JSON, JavaScript Object Notation Formatted Data, that's coming from the Wikipedia API.", 'start': 380.568, 'duration': 7.306}], 'summary': 'Using javascript, a dynamic search url is created and tested, returning json data from the wikipedia api.', 'duration': 60.301, 'max_score': 327.573, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18327573.jpg'}], 'start': 240.739, 'title': 'Wikipedia api data retrieval', 'summary': 'Discusses setting up an interface to dynamically retrieve data from the wikipedia api, including constructing search urls and handling nested callbacks for data retrieval in javascript.', 'chapters': [{'end': 433.435, 'start': 240.739, 'title': 'Wikipedia api data retrieval', 'summary': 'Discusses setting up an interface to dynamically retrieve data from the wikipedia api, including constructing search urls and handling nested callbacks for data retrieval in javascript.', 'duration': 192.696, 'highlights': ['The chapter discusses dynamically constructing search URLs for the Wikipedia API to retrieve data for different search terms. The author dynamically constructs search URLs for the Wikipedia API to retrieve data for different search terms, demonstrating the ability to dynamically change the search term and receive corresponding results.', 'The author explores the challenges of reading the Wikipedia API documentation and the complexity of handling nested callbacks for data retrieval in JavaScript. The author discusses the challenges of reading the Wikipedia API documentation and acknowledges the complexity of handling nested callbacks for data retrieval in JavaScript, indicating the potential need for a more thoughtful approach to sequencing callbacks in the code.', 'The chapter delves into the process of retrieving and processing JSON formatted data from the Wikipedia API to obtain a list of possible pages with the specified search term. The author describes the process of retrieving and processing JSON formatted data from the Wikipedia API to obtain a list of possible pages with the specified search term, demonstrating the practical application of working with JSON formatted data in JavaScript.']}], 'duration': 192.696, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18240739.jpg', 'highlights': ['The author dynamically constructs search URLs for the Wikipedia API to retrieve data for different search terms, demonstrating the ability to dynamically change the search term and receive corresponding results.', 'The author discusses the challenges of reading the Wikipedia API documentation and acknowledges the complexity of handling nested callbacks for data retrieval in JavaScript, indicating the potential need for a more thoughtful approach to sequencing callbacks in the code.', 'The author describes the process of retrieving and processing JSON formatted data from the Wikipedia API to obtain a list of possible pages with the specified search term, demonstrating the practical application of working with JSON formatted data in JavaScript.']}, {'end': 744.762, 'segs': [{'end': 484.841, 'src': 'embed', 'start': 460.586, 'weight': 0, 'content': [{'end': 467.429, 'text': "The Wikipedia API doesn't seem to have something called cores, which is cross origin resources or something like that enabled,", 'start': 460.586, 'duration': 6.843}, {'end': 471.892, 'text': 'allowing us to fetch data from another server, from a server which is where our code is running.', 'start': 467.429, 'duration': 4.463}, {'end': 473.392, 'text': 'Some APIs will let you do this.', 'start': 472.272, 'duration': 1.12}, {'end': 473.913, 'text': "Some won't.", 'start': 473.412, 'duration': 0.501}, {'end': 477.454, 'text': "I'm pretty sure, since I've used this before in code, that there's a way around this.", 'start': 474.353, 'duration': 3.101}, {'end': 478.875, 'text': "It's called JSONP.", 'start': 477.734, 'duration': 1.141}, {'end': 480.456, 'text': 'I sort of made a video about this somewhere else.', 'start': 478.955, 'duration': 1.501}, {'end': 482.078, 'text': "It's JSON with padding.", 'start': 480.896, 'duration': 1.182}, {'end': 484.841, 'text': 'And p5 has a nice option.', 'start': 482.538, 'duration': 2.303}], 'summary': 'Wikipedia api lacks cores for cross-origin resource sharing, but jsonp workaround exists.', 'duration': 24.255, 'max_score': 460.586, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18460586.jpg'}, {'end': 519.325, 'src': 'heatmap', 'start': 488.547, 'weight': 0.981, 'content': [{'end': 492.031, 'text': 'Let me just add another argument here, JSONP.', 'start': 488.547, 'duration': 3.484}, {'end': 495.356, 'text': 'So if I last add this third argument, let me try it with JSONP.', 'start': 492.272, 'duration': 3.084}, {'end': 496.778, 'text': 'And let me run it again.', 'start': 495.937, 'duration': 0.841}, {'end': 498.519, 'text': 'And there we go.', 'start': 497.759, 'duration': 0.76}, {'end': 499.6, 'text': 'It came through.', 'start': 498.919, 'duration': 0.681}, {'end': 501.54, 'text': 'So we could say a lot more about that.', 'start': 499.76, 'duration': 1.78}, {'end': 504.502, 'text': "But in this case, we're just lucky we tried it first without JSONP.", 'start': 501.6, 'duration': 2.902}, {'end': 505.862, 'text': 'Now we try it with JSONP.', 'start': 504.762, 'duration': 1.1}, {'end': 509.203, 'text': "So what I'm looking for is it comes in as an array.", 'start': 505.882, 'duration': 3.321}, {'end': 512.525, 'text': 'I want the first element of the first element of the array.', 'start': 509.644, 'duration': 2.881}, {'end': 519.325, 'text': "So I'm going to try to see if I can say console log data 0, 0.", 'start': 513.585, 'duration': 5.74}], 'summary': 'Testing with jsonp succeeded, accessing array element 0, 0.', 'duration': 30.778, 'max_score': 488.547, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18488547.jpg'}, {'end': 615.547, 'src': 'embed', 'start': 587.989, 'weight': 2, 'content': [{'end': 593.132, 'text': "So what I'm actually going to do is I'm going to say let length equal data index 1.length.", 'start': 587.989, 'duration': 5.143}, {'end': 595.894, 'text': "I think it's going to just give me sort of 10 by default.", 'start': 593.192, 'duration': 2.702}, {'end': 602.579, 'text': "And then I'm going to say, Let index equal floor random length.", 'start': 596.395, 'duration': 6.184}, {'end': 605.56, 'text': 'So I want to pick a random index into that array.', 'start': 603.079, 'duration': 2.481}, {'end': 609.503, 'text': "And I'm going to say data index one, data one index.", 'start': 606.181, 'duration': 3.322}, {'end': 611.284, 'text': 'So this should give me a random article.', 'start': 609.523, 'duration': 1.761}, {'end': 612.585, 'text': "That'll be better.", 'start': 612.024, 'duration': 0.561}, {'end': 615.547, 'text': 'Let me go back to my thing here.', 'start': 612.605, 'duration': 2.942}], 'summary': 'Using javascript to select a random article from an array.', 'duration': 27.558, 'max_score': 587.989, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18587989.jpg'}, {'end': 672.81, 'src': 'embed', 'start': 641.866, 'weight': 1, 'content': [{'end': 643.687, 'text': "OK, so we're getting a random article each time.", 'start': 641.866, 'duration': 1.821}, {'end': 644.587, 'text': "That's good.", 'start': 643.887, 'duration': 0.7}, {'end': 648.249, 'text': "I forgot what I'm doing here exactly, but now let's at least get the article data.", 'start': 645.108, 'duration': 3.141}, {'end': 657.062, 'text': "So the next thing that I want to do once I have that title, so really what I'm saying is var title equals this.", 'start': 649.738, 'duration': 7.324}, {'end': 666.306, 'text': "Now one thing about Wikipedia titles is let's say I try to actually look for unicorns cricket team on Wikipedia.", 'start': 657.702, 'duration': 8.604}, {'end': 672.81, 'text': "So I'm going to go to unicorns cricket team Wikipedia, see if I can get that page.", 'start': 666.847, 'duration': 5.963}], 'summary': 'Developing a program to fetch random wikipedia articles and extract specific data.', 'duration': 30.944, 'max_score': 641.866, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18641866.jpg'}], 'start': 433.555, 'title': 'Handling cross-origin resource sharing (cors) in javascript', 'summary': 'Discusses accessing cross-origin resources using the wikipedia api, addressing cors restrictions with jsonp. it also explores retrieving random articles from the wikipedia api and manipulating their titles using javascript code and live examples.', 'chapters': [{'end': 501.54, 'start': 433.555, 'title': 'Handling cross-origin resource sharing (cors) in javascript', 'summary': 'Discusses the challenge of accessing cross-origin resources using the wikipedia api and the solution of using jsonp to fetch data, ultimately resolving the issue of cors restrictions.', 'duration': 67.985, 'highlights': ["The Wikipedia API doesn't seem to have something called cores, which is cross origin resources or something like that enabled, allowing us to fetch data from another server, from a server which is where our code is running. Some APIs will let you do this. Some won't. I'm pretty sure, since I've used this before in code, that there's a way around this. It's called JSONP.", 'I got cores. Let me just add another argument here, JSONP. So if I last add this third argument, let me try it with JSONP. And let me run it again. And there we go. It came through.', 'Access control allow origin header not present. I cannot use it. Core is disabled. Blah, blah, blah, blah, blah. So this is really unfortunate.']}, {'end': 744.762, 'start': 501.6, 'title': 'Wikipedia api data retrieval', 'summary': 'Explores using the wikipedia api to retrieve random articles and manipulate their titles for use in a web application, demonstrating the process with javascript code and live examples.', 'duration': 243.162, 'highlights': ['The chapter demonstrates using JavaScript to retrieve random articles from the Wikipedia API and manipulate their titles to account for spaces by replacing them with underscores. The speaker uses JavaScript to retrieve random articles from the Wikipedia API and manipulates their titles by replacing spaces with underscores for use in a web application.', "The speaker tests the functionality of retrieving random articles by trying various search terms and confirming the successful retrieval of random articles. The speaker tests the functionality of retrieving random articles by trying various search terms like 'rainbow' and 'unicorn' and confirms the successful retrieval of random articles.", 'The speaker explains the process of picking a random index into the array of articles and using it to retrieve a random article from the Wikipedia API. The speaker explains the process of picking a random index into the array of articles and using it to retrieve a random article from the Wikipedia API for display in the web application.']}], 'duration': 311.207, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18433555.jpg', 'highlights': ['The chapter discusses accessing cross-origin resources using the Wikipedia API and addressing CORS restrictions with JSONP.', 'The speaker demonstrates using JavaScript to retrieve random articles from the Wikipedia API and manipulate their titles by replacing spaces with underscores.', 'The speaker explains the process of picking a random index into the array of articles and using it to retrieve a random article from the Wikipedia API for display in the web application.']}, {'end': 1065.991, 'segs': [{'end': 774.99, 'src': 'embed', 'start': 745.002, 'weight': 1, 'content': [{'end': 747.284, 'text': "I'm going to call this the content URL.", 'start': 745.002, 'duration': 2.282}, {'end': 750.978, 'text': 'This is the URL for asking for the content.', 'start': 748.837, 'duration': 2.141}, {'end': 758.122, 'text': "And I think you can ask the fact that you can see at the end here it's titles equals.", 'start': 751.518, 'duration': 6.604}, {'end': 761.543, 'text': "I think you can ask for content of multiple articles, but I'm just going to do one.", 'start': 758.182, 'duration': 3.361}, {'end': 765.885, 'text': "So what I'm going to do now is back into my code.", 'start': 763.144, 'duration': 2.741}, {'end': 767.386, 'text': "I'm going to go down here.", 'start': 765.905, 'duration': 1.481}, {'end': 771.428, 'text': "See what I mean by this sort of nested callback thing that I've done is kind of a bit of a problem.", 'start': 767.506, 'duration': 3.922}, {'end': 774.99, 'text': "I'm going to say load JSON.", 'start': 772.449, 'duration': 2.541}], 'summary': 'The speaker discusses the process of requesting content using a specific url and addressing potential issues with nested callbacks.', 'duration': 29.988, 'max_score': 745.002, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18745002.jpg'}, {'end': 834.992, 'src': 'embed', 'start': 806.525, 'weight': 0, 'content': [{'end': 808.866, 'text': 'most people would put an anonymous function right in there.', 'start': 806.525, 'duration': 2.341}, {'end': 810.207, 'text': "that's the callback.", 'start': 808.866, 'duration': 1.341}, {'end': 814.629, 'text': 'or use some type of other technique to have nested callbacks like async or promises.', 'start': 810.207, 'duration': 4.422}, {'end': 824.254, 'text': "I'm going to be pretty terrible about it and I'm going to say I'm going to call this gotSearch and I'm going to call this gotContent and just write another function.", 'start': 815.049, 'duration': 9.205}, {'end': 834.992, 'text': "call this data and I'm going to say console, whoops, and I'm going to say console.log data, okay?", 'start': 825.981, 'duration': 9.011}], 'summary': 'Discussion on using nested callbacks and naming conventions for functions.', 'duration': 28.467, 'max_score': 806.525, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18806525.jpg'}, {'end': 883.627, 'src': 'embed', 'start': 856.81, 'weight': 2, 'content': [{'end': 860.872, 'text': "Oh, so I went for rainbow bright, but it didn't get the content of rainbow bright.", 'start': 856.81, 'duration': 4.062}, {'end': 866.175, 'text': "So what I'm going to do is say, ah, why? Because I forgot about JSONP.", 'start': 861.932, 'duration': 4.243}, {'end': 868.379, 'text': 'So I have to do JSONP.', 'start': 867.418, 'duration': 0.961}, {'end': 870.72, 'text': 'I had that cross origin error again.', 'start': 868.399, 'duration': 2.321}, {'end': 876.443, 'text': 'And does this look like I got stuff? This looks weird.', 'start': 871.941, 'duration': 4.502}, {'end': 879.405, 'text': 'So actually, this is working.', 'start': 877.164, 'duration': 2.241}, {'end': 882.086, 'text': 'I just find this to be totally confusing to look at.', 'start': 879.785, 'duration': 2.301}, {'end': 883.627, 'text': 'But the content is in there.', 'start': 882.547, 'duration': 1.08}], 'summary': 'The speaker encountered cross-origin errors while working with jsonp, but ultimately managed to successfully include the content in their work.', 'duration': 26.817, 'max_score': 856.81, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18856810.jpg'}, {'end': 961.44, 'src': 'embed', 'start': 938.467, 'weight': 3, 'content': [{'end': 946.412, 'text': "So, looking at this, I have query pages and then some number, which is the page ID, which is something that's going to be different for every article.", 'start': 938.467, 'duration': 7.945}, {'end': 951.376, 'text': 'So I have to somehow pull that dynamically in order to get down here to this stuff, which is the content, which is what I want.', 'start': 946.432, 'duration': 4.944}, {'end': 959.739, 'text': "So what I'm going to do is I'm going to say, let me look here, and I can change this console log, data.query.pages.", 'start': 952.196, 'duration': 7.543}, {'end': 961.44, 'text': "Let's see what I get.", 'start': 960.799, 'duration': 0.641}], 'summary': 'The speaker discusses dynamically pulling content from query pages based on page ids.', 'duration': 22.973, 'max_score': 938.467, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18938467.jpg'}], 'start': 745.002, 'title': 'Javascript callbacks and wikipedia api', 'summary': "Discusses the concept of content url and nested callbacks in javascript, mentioning the use of async or promises. it also outlines fetching content from wikipedia's api, addressing cross-origin errors and data organization, and dynamically extracting page id and content.", 'chapters': [{'end': 824.254, 'start': 745.002, 'title': 'Content url and nested callbacks', 'summary': 'Discusses the concept of content url and nested callbacks in javascript, illustrating the use of nested callbacks and the challenges associated with it. the speaker also mentions the option of using async or promises for handling nested callbacks.', 'duration': 79.252, 'highlights': ['The speaker discusses the concept of content URL and demonstrates its usage for accessing content in JavaScript.', 'The chapter delves into the challenges of using nested callbacks in JavaScript and suggests using async or promises as alternative techniques.', 'The speaker highlights the use of a nested callback structure in the code and acknowledges its limitations.', 'The speaker mentions the common practice of using an anonymous function or other techniques for handling nested callbacks in JavaScript.']}, {'end': 1065.991, 'start': 825.981, 'title': 'Wikipedia api: fetching content', 'summary': "Outlines the process of fetching content from wikipedia's api, encountering challenges like cross-origin errors and organizing data, while dynamically extracting the page id and content.", 'duration': 240.01, 'highlights': ["Encountering challenges with cross-origin errors and JSON formatting The chapter discusses encountering cross-origin errors and the need to understand the JSON formatting of the data fetched from Wikipedia's API.", "Dynamically extracting the page ID from the fetched data The process of dynamically extracting the page ID from the fetched data using JavaScript's object keys is explained, demonstrating the ability to retrieve different page IDs.", 'Console logging data and querying for content The usage of console.log to view the fetched data and the process of querying for specific content within the data is illustrated.']}], 'duration': 320.989, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj18745002.jpg', 'highlights': ['The chapter delves into the challenges of using nested callbacks in JavaScript and suggests using async or promises as alternative techniques.', 'The speaker discusses the concept of content URL and demonstrates its usage for accessing content in JavaScript.', "Encountering challenges with cross-origin errors and JSON formatting The chapter discusses encountering cross-origin errors and the need to understand the JSON formatting of the data fetched from Wikipedia's API.", "Dynamically extracting the page ID from the fetched data The process of dynamically extracting the page ID from the fetched data using JavaScript's object keys is explained, demonstrating the ability to retrieve different page IDs."]}, {'end': 1478.272, 'segs': [{'end': 1101.101, 'src': 'embed', 'start': 1070.544, 'weight': 7, 'content': [{'end': 1084.715, 'text': 'I want to look at page ID revisions star dot revisions Star.', 'start': 1070.544, 'duration': 14.171}, {'end': 1085.435, 'text': "Now, here's the thing.", 'start': 1084.755, 'duration': 0.68}, {'end': 1089.997, 'text': "You can say dot, the name of the thing, if it's a valid variable name like revisions.", 'start': 1085.916, 'duration': 4.081}, {'end': 1093.638, 'text': "But I can't say dot star, because star is not a valid character for a variable.", 'start': 1090.057, 'duration': 3.581}, {'end': 1095.259, 'text': "So I've got to use these brackets.", 'start': 1093.658, 'duration': 1.601}, {'end': 1099.22, 'text': "Boy, I'm really off my rocker here with this crazy convoluted using Wikipedia.", 'start': 1095.279, 'duration': 3.941}, {'end': 1101.101, 'text': 'Whoa OK, here we go.', 'start': 1099.3, 'duration': 1.801}], 'summary': 'Exploring page id revisions and variable naming limitations in wikipedia.', 'duration': 30.557, 'max_score': 1070.544, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj181070544.jpg'}, {'end': 1279.127, 'src': 'embed', 'start': 1245.813, 'weight': 1, 'content': [{'end': 1248.315, 'text': "But what I'm trying to do here is match a given word.", 'start': 1245.813, 'duration': 2.502}, {'end': 1251.577, 'text': 'And a word is any sequence of characters.', 'start': 1249.535, 'duration': 2.042}, {'end': 1253.037, 'text': "Four or more, I'm deciding.", 'start': 1251.877, 'duration': 1.16}, {'end': 1254.518, 'text': 'And then I want to look at this.', 'start': 1253.077, 'duration': 1.441}, {'end': 1255.879, 'text': "So let's see.", 'start': 1255.159, 'duration': 0.72}, {'end': 1257.42, 'text': "I don't know if I did this right.", 'start': 1255.899, 'duration': 1.521}, {'end': 1260.502, 'text': "Let's see if this gives me a bunch of words on the page.", 'start': 1257.82, 'duration': 2.682}, {'end': 1263.357, 'text': 'Look, it did.', 'start': 1262.837, 'duration': 0.52}, {'end': 1269.942, 'text': 'It gave me 2,474 words, like vandalism, expiry.', 'start': 1263.878, 'duration': 6.064}, {'end': 1279.127, 'text': "The nice thing about p5 is I can now say, I'm going to say var words equals the result of this regular expression.", 'start': 1271.282, 'duration': 7.845}], 'summary': 'A regular expression matches word sequences of four or more characters, resulting in 2,474 words like vandalism and expiry.', 'duration': 33.314, 'max_score': 1245.813, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj181245813.jpg'}, {'end': 1352.468, 'src': 'heatmap', 'start': 1309.868, 'weight': 2, 'content': [{'end': 1312.409, 'text': 'But this goWikiTerm just does it with that thing.', 'start': 1309.868, 'duration': 2.541}, {'end': 1315.271, 'text': 'So now I can say goWikiTerm.', 'start': 1313.089, 'duration': 2.182}, {'end': 1322.123, 'text': "Now, I'm going to probably crash my browser, because I'm going to be doing this over and over again, and I should put something in that stops.", 'start': 1317.119, 'duration': 5.004}, {'end': 1325.285, 'text': "But it'll actually just go back and do this whole sequence again.", 'start': 1322.523, 'duration': 2.762}, {'end': 1327.507, 'text': "So let's see what happens.", 'start': 1326.446, 'duration': 1.061}, {'end': 1329.448, 'text': 'Hey, look at this.', 'start': 1328.948, 'duration': 0.5}, {'end': 1334.952, 'text': 'Hey! A Wikipedia random article crawler.', 'start': 1330.549, 'duration': 4.403}, {'end': 1335.773, 'text': 'I need to stop.', 'start': 1335.012, 'duration': 0.761}, {'end': 1340.717, 'text': "How do I stop it? OK, let's at least figure out, oh, good, at least I got an error.", 'start': 1336.133, 'duration': 4.584}, {'end': 1342.498, 'text': "At some point, that's how I stopped it.", 'start': 1341.237, 'duration': 1.261}, {'end': 1343.279, 'text': 'Look how far I got.', 'start': 1342.538, 'duration': 0.741}, {'end': 1344.72, 'text': 'I got to the return of Saturn.', 'start': 1343.339, 'duration': 1.381}, {'end': 1352.468, 'text': 'So somehow we got femme fatale, made in America, each tier, from rainbow South Korean band.', 'start': 1346.684, 'duration': 5.784}], 'summary': "Experiment with gowikiterm led to wikipedia random article crawler reaching 'return of saturn'.", 'duration': 42.6, 'max_score': 1309.868, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj181309868.jpg'}, {'end': 1396.75, 'src': 'embed', 'start': 1368.438, 'weight': 5, 'content': [{'end': 1374.922, 'text': "And if counter is greater than 10, oh, it's less than 10, so only do this 10 times.", 'start': 1368.438, 'duration': 6.484}, {'end': 1382.084, 'text': "And I'm just going to say create div just so it's a little less of all that space.", 'start': 1376.602, 'duration': 5.482}, {'end': 1384.505, 'text': "And now let's try this one more time.", 'start': 1382.504, 'duration': 2.001}, {'end': 1387.807, 'text': 'It did it 10 times, and it stopped.', 'start': 1385.926, 'duration': 1.881}, {'end': 1395.029, 'text': 'And in theory, I should be able to now the counter should get reset any time changed.', 'start': 1388.427, 'duration': 6.602}, {'end': 1396.75, 'text': "But you know what I'm going to do? Forget it.", 'start': 1395.129, 'duration': 1.621}], 'summary': 'Loop executed 10 times, counter reset, but not satisfied with result', 'duration': 28.312, 'max_score': 1368.438, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj181368438.jpg'}, {'end': 1475.291, 'src': 'embed', 'start': 1423.465, 'weight': 0, 'content': [{'end': 1431.148, 'text': 'And that does go wiki user input dot value and also sets the counter equal to zero.', 'start': 1423.465, 'duration': 7.683}, {'end': 1432.069, 'text': 'There we go, perfect.', 'start': 1431.228, 'duration': 0.841}, {'end': 1433.43, 'text': 'Now everything is done.', 'start': 1432.389, 'duration': 1.041}, {'end': 1451.02, 'text': "So I can actually do this and I can change this to unicorn and it'll give me crawl a bunch of random articles and then I can give it happy and it will crawl a bunch of random articles and end with music.", 'start': 1434.01, 'duration': 17.01}, {'end': 1451.94, 'text': 'OK, everybody.', 'start': 1451.38, 'duration': 0.56}, {'end': 1456.062, 'text': 'Thank you for watching this random Wikipedia article coding challenge thing.', 'start': 1452.18, 'duration': 3.882}, {'end': 1457.523, 'text': 'It required a lot.', 'start': 1456.082, 'duration': 1.441}, {'end': 1458.983, 'text': 'It required regular expressions.', 'start': 1457.543, 'duration': 1.44}, {'end': 1467.147, 'text': 'It requires callbacks and low JSON and JSONP and how the Wiki API works, Wikipedia API.', 'start': 1459.324, 'duration': 7.823}, {'end': 1475.291, 'text': 'I hope you make something from this and actually be more thoughtful and have an idea here of why you might want to crawl Wikipedia and make some kind of strange thing with it.', 'start': 1467.487, 'duration': 7.804}], 'summary': 'Coding challenge involved using regular expressions, callbacks, json, and wikipedia api to crawl random articles.', 'duration': 51.826, 'max_score': 1423.465, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj181423465.jpg'}], 'start': 1070.544, 'title': 'Wikipedia data analysis', 'summary': 'Covers challenges of accessing page id revisions, creating a wikipedia page crawler resulting in 2,474 words found, and coding a function to crawl random wikipedia articles using javascript.', 'chapters': [{'end': 1132.717, 'start': 1070.544, 'title': 'Page id revisions analysis', 'summary': 'Explores the challenges of accessing page id revisions in wikipedia, highlighting the complexity of using dot star as it is not a valid character for a variable, and the detective work involved in understanding the content of the wikipedia page.', 'duration': 62.173, 'highlights': ['The complexity of using dot star as it is not a valid character for a variable', 'The detective work involved in understanding the content of the Wikipedia page']}, {'end': 1344.72, 'start': 1133.037, 'title': 'Wikipedia page crawler', 'summary': 'Explores creating a wikipedia page crawler using regular expressions to extract words and pick random articles, resulting in 2,474 words found and the ability to generate a wikipedia random article crawler.', 'duration': 211.683, 'highlights': ["The chapter demonstrates using regular expressions to extract 2,474 words from the Wikipedia page, including examples such as 'vandalism' and 'expiry'.", "The chapter showcases the implementation of a random word picker using the p5 random function, exemplified by the selection of the word 'average'.", "The chapter highlights the development of a Wikipedia random article crawler, showcasing the process and resulting in the discovery of 'the return of Saturn'."]}, {'end': 1478.272, 'start': 1346.684, 'title': 'Wikipedia article coding challenge', 'summary': 'Demonstrates coding a function to crawl random wikipedia articles using javascript, including creating a counter, a startsearch function, and utilizing regular expressions and jsonp.', 'duration': 131.588, 'highlights': ['The chapter demonstrates coding a function to crawl random Wikipedia articles using JavaScript, including creating a counter, a startSearch function, and utilizing regular expressions and JSONP.', 'The code creates a counter to limit the number of times the function can be executed, with a maximum of 10 iterations.', 'The startSearch function is designed to take user input, reset the counter, and initiate the Wikipedia article crawling process.', 'The coding challenge required understanding and implementing regular expressions, callbacks, JSON, JSONP, and the Wikipedia API.']}], 'duration': 407.728, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RPz75gcHj18/pics/RPz75gcHj181070544.jpg', 'highlights': ['The chapter demonstrates coding a function to crawl random Wikipedia articles using JavaScript, including creating a counter, a startSearch function, and utilizing regular expressions and JSONP.', "The chapter demonstrates using regular expressions to extract 2,474 words from the Wikipedia page, including examples such as 'vandalism' and 'expiry'.", "The chapter highlights the development of a Wikipedia random article crawler, showcasing the process and resulting in the discovery of 'the return of Saturn'.", 'The coding challenge required understanding and implementing regular expressions, callbacks, JSON, JSONP, and the Wikipedia API.', 'The startSearch function is designed to take user input, reset the counter, and initiate the Wikipedia article crawling process.', 'The code creates a counter to limit the number of times the function can be executed, with a maximum of 10 iterations.', 'The detective work involved in understanding the content of the Wikipedia page', 'The complexity of using dot star as it is not a valid character for a variable']}], 'highlights': ['Creating games by crawling and moving around Wikipedia is an effective use of the API, with various interesting examples available.', "Accessing Wikipedia's contents allows for the creation of poetry machines and other experimental text-based projects.", 'The chapter demonstrates creating a user input box in HTML using p5 function create input and handling user input events.', "The chapter discusses writing JavaScript and user input, including adding 'rainbow' as a value and dealing with user interaction.", 'The presenter encourages viewers to explore more creative and exciting possibilities with the user input box.', "The function 'Go wiki' is created to retrieve and log the user input value.", 'The preference for a button or submit option for user interaction.', 'The variety of ways to write JavaScript.', 'The author dynamically constructs search URLs for the Wikipedia API to retrieve data for different search terms, demonstrating the ability to dynamically change the search term and receive corresponding results.', 'The author discusses the challenges of reading the Wikipedia API documentation and acknowledges the complexity of handling nested callbacks for data retrieval in JavaScript, indicating the potential need for a more thoughtful approach to sequencing callbacks in the code.', 'The author describes the process of retrieving and processing JSON formatted data from the Wikipedia API to obtain a list of possible pages with the specified search term, demonstrating the practical application of working with JSON formatted data in JavaScript.', 'The chapter discusses accessing cross-origin resources using the Wikipedia API and addressing CORS restrictions with JSONP.', 'The speaker demonstrates using JavaScript to retrieve random articles from the Wikipedia API and manipulate their titles by replacing spaces with underscores.', 'The speaker explains the process of picking a random index into the array of articles and using it to retrieve a random article from the Wikipedia API for display in the web application.', 'The chapter delves into the challenges of using nested callbacks in JavaScript and suggests using async or promises as alternative techniques.', 'The speaker discusses the concept of content URL and demonstrates its usage for accessing content in JavaScript.', "Encountering challenges with cross-origin errors and JSON formatting The chapter discusses encountering cross-origin errors and the need to understand the JSON formatting of the data fetched from Wikipedia's API.", "Dynamically extracting the page ID from the fetched data The process of dynamically extracting the page ID from the fetched data using JavaScript's object keys is explained, demonstrating the ability to retrieve different page IDs.", 'The chapter demonstrates coding a function to crawl random Wikipedia articles using JavaScript, including creating a counter, a startSearch function, and utilizing regular expressions and JSONP.', "The chapter demonstrates using regular expressions to extract 2,474 words from the Wikipedia page, including examples such as 'vandalism' and 'expiry'.", "The chapter highlights the development of a Wikipedia random article crawler, showcasing the process and resulting in the discovery of 'the return of Saturn'.", 'The coding challenge required understanding and implementing regular expressions, callbacks, JSON, JSONP, and the Wikipedia API.', 'The startSearch function is designed to take user input, reset the counter, and initiate the Wikipedia article crawling process.', 'The code creates a counter to limit the number of times the function can be executed, with a maximum of 10 iterations.', 'The detective work involved in understanding the content of the Wikipedia page', 'The complexity of using dot star as it is not a valid character for a variable']}