Jsoupに切り替えることができる場合:
/* Connect to URL and parse it into a 'Document' */
Document doc = Jsoup.connect("http://assignments.uspto.gov/assignments/q?db=pat&qt=asne&reel=&frame=&pat=&pub=&asnr=&asnri=&asne=sasa&asnei=&asns=").get();
/* Select the required tag and print the value */
System.out.println(doc.select("p.t2").first().text());
終わり!
出力:
合計: 83
(ウェブサイトで値が変更されました)
セレクターは次のように説明しました。
doc.select("p.t2") // Select each 'p'-tag with 't2' attribute from document
.first() // Get the first one (there are two on the website, but the first one is the required one)
.text() // Get the text of this element
ドキュメンテーション: