Can you help me fix this script?
public int getVotes()
{
URL url = null;
InputStreamReader isr = null;
BufferedReader in = null;
try
{
url = new URL(http);
URLConnection con = url.openConnection();
con.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2");
isr = new InputStreamReader(url.openStream());
in = new BufferedReader(isr);
String inputLine;
while ((inputLine = in.readLine()) != null)
{
// for top-zone
if (inputLine.contains("Votes:"))
{
return Integer.valueOf(inputLine.split(">")[3].replace("</div", ""));
}
}
Linkback: https://l2topzone.com/forum/index.php?topic=18042.0