随笔分类 -  java网页抓取

摘要:1、生成document的方法 Document course = Jsoup.connect("http://202.114.224.81:7777/pls/wwwbks/bkscjcx.curscopre").cookies(cookies) .tim... 阅读全文
posted @ 2014-05-07 11:13 行云有影 阅读(369) 评论(0) 推荐(0)
摘要:1、url提交表单 Map map = new HashMap(); map.put("stuid", ""); map.put("pwd", ""); //如果有跳转(302),会自动跳转 Document doc = Jsou... 阅读全文
posted @ 2014-05-07 11:11 行云有影 阅读(992) 评论(0) 推荐(0)
摘要:转换成GBK String html = fetchUrlService.get(url); //用默认字符编码解码字符串。 byte[] bs = html.getBytes(); //用新的字符编码生成字符串 html= new String(bs, "GBK");Done 阅读全文
posted @ 2014-04-07 15:44 行云有影 阅读(181) 评论(0) 推荐(0)
摘要:1、html 白天 ... 阅读全文
posted @ 2014-04-03 10:31 行云有影 阅读(294) 评论(0) 推荐(0)