After some head scratching with the Wiki API I managed to finish this project. I switched from using opensearch to srsearch today, that really helped to clean up my code. Any feedback appreciated!
I’m thinking of changing the random functionality so the random article will show as a single big search result with link, so that you can ‘browse’ some random pages before reading it on Wikipedia. If I can muster up the courage to fight with that API again, that is