Created
July 30, 2021 18:09
-
-
Save joriki/5cc6354b5ff1b434e7d072e946c54080 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package games.chess.fide; | |
import java.io.IOException; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Element; | |
public class WorldRankingExtracter { | |
public static void main(String [] args) throws IOException { | |
int rank = 0; | |
for (Element player : Jsoup.connect("https://ratings.fide.com/top.phtml?list=men").get().select("a.tur")) { | |
String attr = player.attr("href"); | |
System.out.println('|' + attr.substring(attr.indexOf('=') + 1) + "=" + ++rank); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment