[Solved] A Random Wikipedia Article Generator

According to: https://en.wikipedia.org/wiki/Wikipedia:Special:Random The endpoint for a categorized random subject is: https://en.wikipedia.org/wiki/Special:RandomInCategory/ And not: https://en.wikipedia.org/wiki/Special:Random/ So you should change your url to: url = requests.get(f”https://en.wikipedia.org/wiki/Special:RandomInCategory/{topic}”) 1 solved A Random Wikipedia Article Generator

[Solved] Is there a way to get the main paragraph from Wikipedia using JavaScript only? [closed]

To avoid cross-domain issues, you can do this using JSONP: $.getJSON(“http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&format=json&callback=?&titles=Google”, function(data){ var page = data.query.pages; var intro = “”; for (var key in page) { var obj = page[key]; intro = obj.extract; } console.log(intro); }); 1 solved Is there a way to get the main paragraph from Wikipedia using JavaScript only? [closed]