How can I capture the webpage content paginated by JS? I want to capture the content of a website. this website paging mechanism uses js. Details: [size = 10px] HTMLcode & lt; ahref = & quot; javascript: gogage (pageno + 1) & quot; class = & quot; navigation & quot; & gt; next page <How can I capture the content of a webpage paginated by JS?
I want to capture the content of a website. The paging mechanism of this website uses js. The details are as follows:
[Size = 10px]
HTML code
Next page
JScript code
var pageno=1; function gogage(pno){ tbl.firstPage(); pageno=1; for(var i=1; (i < pno||pno==-1)&&i
HTML code
Please enlighten me!------ Solution --------------------Help me!------ Solution --------------------Take down the html page, and take down the data at the location specified by "# xmldso", that is, all the content. It has little to do with paging.------ Solution --------------------Help!------ Solution --------------------Capture webpage content using htmlparser (1)Import org.html parser. Node;Import org.html parser. NodeFilter;Import org.html parser. Parser;Import org.html parser. filters. TagNameFilter;Import org.html parser. tags. TableTag;Import org.html parser. util. NodeList;/**** Title:* Function overview:* Copyright: cityyouth.cn (c) 2005* Company: Shanghai City Youth Network* Creation Time: 2005-12-21* Modification time:* Reason for modification:** @ Author Zhang Wei* @ Version 1.0*/Public class TestYahoo {Public static void testHtml (){Try {String sCurrentLine;String sTotalString;SCurrentLine = "";STotalString = "";Java. io. InputStream l_urlStream;Java.net. URL l_url = new java.net. URL (Http://sports.sina.com.cn/iframe/nba/live ");Java.net. HttpURLConnection l_connection = (java.net. HttpURLConnection) l_url. OpenConnection ();Rochelle connection.connect ();Rochelle urlstream = Rochelle connection.getinputstream ();Java. io. BufferedReader l_reader = new java. io. BufferedReader (New java. io. InputStreamReader (l_urlStream ));While (sCurrentLine = l_reader.readLine ())! = Null ){STotalString + = sCurrentLine;}System. out. println (sTotalString );System. out. println ("===================== ");String testText = extractText (sTotalString );System. out. println (testText );} Catch (Exception e ){E. printStackTrace ();}}/*** Extract plain text information** @ Param inputHtml* @ Return*/Public static String extractText (String inputHtml) throws Exception {StringBuffer text = new StringBuffer ();Parser parser = Parser. createParser (new String (inputHtml. getBytes (),"8859_1"), "8859-1 ");// Traverse all nodesNodeList nodes = parser. extractAllNodesThatMatch (new NodeFilter (){Public boolean accept (Node node ){Return true;