Wait for the whole webpage to be fully loaded.I will tell you how to find a player ID now. The reason I have this line is that sometimes a player with name #unknown appears, due to their rubbish servers. In Line 28, remember to change that value to a real op.gg player ID. Since the companying I am working for is a company focused on Greater China, most of the server settings are Asia or Southeast Asia or Japan/Korea.
You can change it to other servers if you feel like doing that. In Line 19 and Line 42, the query variable server is set to as. You should expect your server to do work proportionally to 512,000 users, which could eat up all of the memory of your server/PC. The size of the data grows exponentially! Suppose there are 80 players in each game and you decided to call userMap 3 times. By calling userMap twice, I was able to capture 4970 distinct users, and it took me an hour.