uses JSoup, make sure to get it there http://jsoup.org/
if you don't know what this is, you don't need it and it isn't for you
adapt to your needs
enjoy
if you used my old scraper I released before, here is some compatible code
if you don't know what this is, you don't need it and it isn't for you
PHP Code:
public static final String URL = "http://www.gtop100.com/maplestory/";
public static final List<GtopEntry> entries = new ArrayList<>();
public static void main(String[] args) {
try {
Document doc = Jsoup.connect(URL).get();
doc.getElementsByClass("list-reviews").select("li").forEach(c -> {
Element divscore = c.select("div[class$=div-score]").first();
Elements divextrawarp = c.select("div[class$=extra-wrap]");
String title = divextrawarp.first().select("span[class$=col14]").text();
String description = divextrawarp.first().select("p").text();
int in = Integer.parseInt(divscore.childNodes().get(0).outerHtml().replaceAll("[^\\d.]", ""));
int out = Integer.parseInt(divscore.childNodes().get(2).outerHtml().replaceAll("[^\\d.]", ""));
int rank = Integer.parseInt(divscore.childNodes().get(1).outerHtml().replaceAll("[^\\d.]", ""));
entries.add(new GtopEntry(title, description, rank, in, out));
});
} catch (IOException e) {
e.printStackTrace();
}
entries.forEach(c -> {
System.out.println(c.toString());
});
}
static class GtopEntry {
public final String title, description;
public final int rank, in, out;
public GtopEntry(String title, String description, int rank, int in, int out) {
this.title = title;
this.description = description;
this.rank = rank;
this.in = in;
this.out = out;
}
[MENTION=2000004426]Override[/MENTION]
public String toString() {
return "GtopEntry{" +
"title='" + title + '\'' +
", description='" + description + '\'' +
", rank=" + rank +
", in=" + in +
", out=" + out +
'}';
}
}
enjoy
if you used my old scraper I released before, here is some compatible code
Spoiler: