Int result (string website) // returns the numeric ID in Js.
{
String html = getpagecodes ("http://www.pcpop.com/"); // call the previous capture pageSource codeMethod
String zipregexpop = @ "\/ashow .*? \. Js "; // Regular Expression matching Js. Adjust the regular expression according to different situations, for example :\/.*? \. JS, matching all. js files on the page
JS = getpagecode. getjs (HTML, zipregexpop); len1 = Js. lastindexof ('/'); len2 = Js. lastindexof ('. '); len1 = len1 + 1; pageid = int. parse (JS. substring (len1, len2-len1); Return pageid;
}
This is a simple method to capture the page source.CodeThen, obtain the desired show/*/. js file and perform some specific analysis.
Different JavaScript codes can be obtained based on specific needs, because each JS plays a different role. It seems like it is nonsense.
The above function is implemented based on the task URL to obtain a special JS contained in the source code, which can be expanded according to the specific needs, throwing a stone here