{"action":"opened","issue":{"url":"https://api.github.com/repos/ryankklam/Test/issues/2","labels_url":"https://api.github.com/repos/ryankklam/Test/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/ryankklam/Test/issues/2/comments","events_url":"https://api.github.com/repos/ryankklam/Test/issues/2/events","html_url":"https://github.com/ryankklam/Test/issues/2","id":56497917,"number":2,"title":"enquiryDocInfo","user":{"login":"ryankklam","id":4957936,"avatar_url":"https://avatars.githubusercontent.com/u/4957936?v=3","gravatar_id":"","url":"https://api.github.com/users/ryankklam","html_url":"https://github.com/ryankklam","followers_url":"https://api.github.com/users/ryankklam/followers","following_url":"https://api.github.com/users/ryankklam/following{/other_user}","gists_url":"https://api.github.com/users/ryankklam/gists{/gist_id}","starred_url":"https://api.github.com/users/ryankklam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryankklam/subscriptions","organizations_url":"https://api.github.com/users/ryankklam/orgs","repos_url":"https://api.github.com/users/ryankklam/repos","events_url":"https://api.github.com/users/ryankklam/events{/privacy}","received_events_url":"https://api.github.com/users/ryankklam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-04T09:06:45Z","updated_at":"2015-02-04T09:06:45Z","closed_at":null,"body":"\tpublic void test_Joup() throws IOException{\r\n\t\t\r\n\t\tFile pages = new File(\".\\\\Pages\\\\QuickSearch.htm\"); //相对路径\r\n\t\tDocument docPages = Jsoup.parse(pages, \"UTF-8\", \"www.guahao.gov.cn\");\r\n//\t\tElement docBasicInfo = (Element) docPages.select(\"div.resultList\").first();\r\n\t\tElement docBasicInfo = (Element) docPages.select(\"ul.bg_kk li\").first(); //li element under ul class = \"bg_kk\"\r\n\t\tElement link = docBasicInfo.select(\"a[href]\").first();\r\n\t\tString linkHref = link.attr(\"href\");\r\n\t\tString linkText = link.text();\r\n\t\tString linkText2 = docBasicInfo.text();\r\n\t\tjava.net.URLDecoder.decode(linkText, \"UTF-8\");\r\n\t\t\r\n\t\tPattern pt = Pattern.compile(\"DOC_ID=([\\\\d]+)\"); //匹配以字符串“DOC_ID=”开头，后面匹配数字 \r\n\t\tMatcher mt = pt.matcher(linkHref);\r\n\t\tif(mt.find()) {\r\n\t\t\tString matcher = mt.group(0);\r\n\t\t\tString docID = mt.group(1);\r\n//\t\t\texpertID = matcher.substring(matcher.lastIndexOf(\"/\")+1, matcher.lastIndexOf(\"?\")); //截取/开头 ， 问号结束中间的字符串\r\n\t\t\tSystem.out.println(docID);\r\n\t\t\tSystem.out.println(linkText);\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n//\t\tthis.getVar(\"DOC_ID\", linkHref, \"0\");\r\n\t\tSystem.out.println(\"End.\");\r\n\t}"}}