http://bt.btchina.net/?categoryid=-3我要得到上面页面的电影链接地址
可是我用代码读页面的时候,报403错误,该怎么解决???
代码如下:                  URL url = null;
InputStream is = null;
InputStreamReader reader = null;
HttpURLConnection conn = null;
DOMParser parser = new DOMParser();
try {
url = new URL("http://bt.btchina.net/?categoryid=-3");
synchronized(lock){
conn = (HttpURLConnection) url.openConnection();
is = conn.getInputStream();
reader = new InputStreamReader(is, "gb2312");
parser.parse(new InputSource(reader));
}
                String a = parser.getXMLParserConfiguration().toString();
System.out.println(a);
} catch (Exception e) {
//e.printStackTrace();
System.out.println(Thread.currentThread().getName()+"的异常: "+e.getMessage());
return parser;
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if (reader != null) {
try {
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (conn != null)
conn.disconnect();

}
报错信息如下:
main的异常: Server returned HTTP response code: 403 for URL: http://bt.btchina.net/?categoryid=-3
org.cyberneko.html.HTMLConfiguration@1a5f739急死了!!!大家帮帮忙吧!!!在线等啊