public Document getDocument( String url, String encode ) {
        Document doc = null;
        try {
            if ( encode.equals("UTF-8") ) {
                doc = Jsoup.connect(url)
                        .timeout(50000)
                        .userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1")
                        .get();
            }
            else if ( encode.equals("GBK") ) {
                try {
                    URL link = new URL(url);
                    BufferedReader reader = new BufferedReader(new InputStreamReader(link.openStream()));
                    StringBuffer buffer = new StringBuffer();
                    String line;
                    while ((line = reader.readLine()) != null) {
                        buffer.append(line + "\n");
                    }
                    doc = Jsoup.parse(buffer.toString(), "utf-8");
                }catch (Exception e) {
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    e.printStackTrace(new PrintStream(baos));
                    NewsEyeSpider.logger.debug(baos.toString());
                }
            }
        }catch (Exception e) {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            e.printStackTrace(new PrintStream(baos));
            NewsEyeSpider.logger.debug(baos.toString());
        }
        return doc;
    }