从html页面Android中读取数据

时间:2015-08-10 12:06:34

标签: java android html

我正在浏览html-address中的ftp目录,我想列出所有文件而不获取html代码。这是我现在的代码

TypeError: __init__() got an unexpected keyword argument 'proxy_url'

但这是输出

   new Thread(new Runnable() {
        public void run() {
    URL oracle = null;
    try {
        oracle = new URL("http://mopedshowcase.com/Comments/Cross/1/");
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    BufferedReader in = null;
    try {
        in = new BufferedReader(
                new InputStreamReader(oracle.openStream()));
    } catch (IOException e) {
        e.printStackTrace();
    }

    String inputLine;
    try {
        while ((inputLine = in.readLine()) != null) {
            final String ass = inputLine;
            runOnUiThread(new Runnable() {
                @Override
                public void run() {

                   Log.e("My : ",""+ass);
                }
            });
        }
    } catch (IOException e) {
        e.printStackTrace();
    }
    try {
        in.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
        }}).start();
}

如何获取网站内容而不是html代码呢? 感谢

0 个答案:

没有答案