The rules of the souk World Network Information Collector are created at the underlying layer by the tiger language developed by the company itself. The method of use is similar to the method of using windowsapi. You only need to call the corresponding functions, you can implement the corresponding functions.
First, we need to understand the syntax of the tiger language, its expression and commonProgramming LanguageFor example, the declaration method of the function connected by a string is: basefunction <string>: concatstring ("string 1", "string 2 "); basefunction indicates all function tags. Any function in the tiger language starts with this tag. <string> indicates the function return type, the returned type is a string type, and the concatstring is the name of the function to be called. The brackets indicate the parameters received by the function. Note that the tiger language is case sensitive.
After understanding the simple syntax of the tiger language, how should we use it?
, We only need to set URL dynamic execution in the rule, or post dynamic execution, then the program will automatically treat the text in the basic website as the tiger language and execute it as appropriate.
Where is the tiger language used? Sometimes, the information we capture must be processed during the capture process to meet our needs. At this time, the tiger language can easily meet your needs. For example, the information provided on the webpage is 10, but in the obtained URL allitem = 150, 150 is the number of pages multiplied by 15, and the webpage can only get the number of pages, then we can use the tiger language to easily implement this logic.
Basefunction < String > : Concatstring ( " Http://www.zzz.com/search.aspx? Allitem = " , Basefunction < String > : Multinum ( < 1 > , 15 ));
<1> is the data that matches the first matching rule in URL analysis, that is, the number of pages we can get.
VaR < String > : URL (basefunction < String > : Concatstring ( " Http://soft.sokezone.com/SoftTest/test.aspx? Type1 = <1> & type2 = <2> & page = <, <3>,> " , "\ R \ n" ));
Basefunction < Void > : Writefile ( " C: \ a.txt " , Memberfield: URL );
VaR < String > : URL ();
This logic indicates that the current generated URL is injected into a file, so that the URL will be recorded as it is crawled, we can use the recorded URL list to download the resource.
It's that simple.ArticleWe will gradually help you gradually understand and learn how to use the tiger language and skills, so that you can better set up your crawling rules. Thank you.
Soukworld Network Information Collector