我正在使用JSoup下載和解析Android問題頁面。這是我的代碼到目前爲止:JSoup不解析Android已知問題頁面
URL url = null;
try {
url = new URL(
"http://www.google.com/support/androidmarket/developer/bin/static.py?page=known_issues.cs");
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
Document document = Jsoup.parse(url, 5000);
EditText bla;
bla = (EditText) this.findViewById(R.id.editText1);
bla.setText(document.toString());
if (document.toString().contains("recentfixes")) {
Toast.makeText(this, "YES", 1).show();
}
那麼,奇怪的是,整個頁面被解析,但最近的修復部分。 This是wget輸出,this是解析輸出。
你能幫我嗎?
是否有任何其他HTML解析器,你可以試試嗎?我發現http://htmlcleaner.sourceforge.net/非常強大。 –
謝謝,我會嘗試一個:) – Force
不,它不解析最近的修復......這很奇怪。 – Force