Random Game Selector

Any ideas how RoPro chooses random game based on a number? (popular games)
example RoPro - Random Game
They do have api but I don’t want to use it or smth wanna just understand how they do it to recreate it in my own project

You can say that they have curated list but isn’t its kinda hard to maintain that? considering that it lets you input any number? like you can get a millionth game

they probably automatically periodically scrape the front page, put their Id’s in an array and just pick a random one

Just though about that, but as i’ve seen the dice lets you input any number, which could lead to as I said earlier games like 1.000.001 or smth

they might scrape players profiles for favourites that have active games, wouldnt be that hard to just iterate through a few friends lists to collect most of the active games on the site