* This file is part of DrFTPD, Distributed FTP Daemon. * * DrFTPD is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * DrFTPD is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with DrFTPD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package net.thirdparty.plugins.irc.tvtome; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.lang.Character; import net.sf.drftpd.util.ReplacerUtils; import org.apache.log4j.Logger; import org.drftpd.plugins.SiteBot; import org.tanesha.replacer.ReplacerEnvironment; /** * @author MOZ */ public class tveps { private static final Logger logger = Logger.getLogger(TVTomeParser.class); private String[] _seperators = {".", "-", "_", "[", "]"}; private static final String _url = "http://www.tvtome.com"; private boolean _foundTVeps; private String _eps; private String _title; public boolean foundFilm() { return _foundTVeps; } } url = new URL(_url); urlConn = url.openConnection(); if (!(urlConn.getContent() instanceof InputStream)) return false; try { in = new BufferedReader(new InputStreamReader(urlConn .getInputStream())); while ((line = in.readLine()) != null) data = data + line + "\n"; } finally { in.close(); } //Still need to edit this _title = parseData(data, "