StinkyMadness Posted April 22, 2022 Posted April 22, 2022 (edited) So, I found in my old HDD some files and maybe someone want to use this one. You can use the code to find current votes of vote sites. Here is the Java Class : https://pastebin.com/EtTxVrM4 And here are some example's for few sites: System.out.println("l2topzone.com: " + new ContentURL("https://l2topzone.com/lineage/server-info/6084/l2damage", "span.label.label-info").toInt()); System.out.println("l2.hopzone.net: " + new ContentURL("https://l2.hopzone.net/lineage2/details/93067/l2-damage", "span.rank.tooltip.hidden").toInt()); System.out.println("l2network.eu: " + new ContentURL("https://l2network.eu/details/346/L2Exilium-World/", "span.btn-label.btn-label-right").toInt()); System.out.println("topservers200.com : " + new ContentURL("https://topservers200.com/lineage2/1/l2mad", "a#vote-btn.btn-vote > span").toInt()); System.out.println("l2.topgameserver.net : " + new ContentURL("https://l2.topgameserver.net/lineage/server-detail/250/L2Reborn", "div.votes-count > strong").toInt()); System.out.println("l2top.co : " + new ContentURL("https://l2top.co/server-info/L2Unity", "li.text4").toInt()); System.out.println("top.l2jbrasil.com: " + new ContentURL("https://top.l2jbrasil.com/index.php?a=stats&u=djvogans", "div#adminctt b:contains(Entradas(Total):)").next().toInt()); System.out.println("l2votes.com : " + new ContentURL("https://l2votes.com/serverPage.php?sid=8", "a.votes").toInt()); System.out.println("itopz.com : " + new ContentURL("https://itopz.com/info/325312", "span.btn.badge.badge-secondary").toInt()); System.out.println("l2jtop.com : " + new ContentURL("https://l2jtop.com/server/exiliumworld/info/", "div.votes").toInt()); System.out.println("l2top.gr : " + new ContentURL("https://l2top.gr/?a=details&u=l2kot", "span.badge.badge-light").toInt()); // Example Output // l2topzone.com: 4878 // l2.hopzone.net: 21588 // l2network.eu: 11658 // topservers200.com : 4221 // l2.topgameserver.net : 50228 // l2top.co : 8418 // top.l2jbrasil.com: 36593 // l2votes.com : 2649 // itopz.com : 544 // l2jtop.com : 12897 // l2top.gr : 504 I guess everyone that is not lazy is able to add any website he want and create basic system for rewarding the players. To use the class you should import Jsoup.jar on your project : https://jsoup.org/download Edited April 22, 2022 by StinkyMadness 2 2 Quote
Nightw0lf Posted May 1, 2022 Posted May 1, 2022 I will talk about my website itopz the link you use (https://itopz.com/info/325312) will consume according to gmetrix Total Page Size - 3.00MB Fully Loaded Time 8.0s when I have this API that is instant and works only for this porpuse (where demo secret API key for each server owner) https://itopz.com/check/DEMO/325499/ (global server vote info) https://itopz.com/check/DEMO/325499/5.111.134.5/ (individual voter) so why use an external library instead of pure java methods with also so many shared stuff that working like https://github.com/nightw0lv/iTopZ-Java https://github.com/nightw0lv/iTopZ-PHP/blob/master/voteCheck.php they are ready and they are free and thats talking about my website not the others conclusion is not efficient, its slow, its very slow and its shared in much more better way. 1 Quote
StinkyMadness Posted May 2, 2022 Author Posted May 2, 2022 2 hours ago, Nightw0lf said: ... Reading whole HTML result its not the best way to find votes when the site support JSON results ofc.. but not all sites share JSON information's for global results. Also the Jsoup lib can be used for finding any information from URL not only votes and the class I shared its an simple example. You can grab any info with simple inspect line you want to grab. Anyway... its just a guide for jsoup, not code share. I hope one day all toplist sites provide JSON results for global votes like your site. GJ :) Quote
Kara Posted May 2, 2022 Posted May 2, 2022 10 hours ago, Nightw0lf said: I will talk about my website itopz the link you use (https://itopz.com/info/325312) will consume according to gmetrix Total Page Size - 3.00MB Fully Loaded Time 8.0s when I have this API that is instant and works only for this porpuse (where demo secret API key for each server owner) https://itopz.com/check/DEMO/325499/ (global server vote info) https://itopz.com/check/DEMO/325499/5.111.134.5/ (individual voter) so why use an external library instead of pure java methods with also so many shared stuff that working like https://github.com/nightw0lv/iTopZ-Java https://github.com/nightw0lv/iTopZ-PHP/blob/master/voteCheck.php they are ready and they are free and thats talking about my website not the others conclusion is not efficient, its slow, its very slow and its shared in much more better way. Welcome back my veteran Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.