| Scripts for "WWW" |
|
Scripts are intended for extraction of data from sites.
"ScriptI" - a script for extraction of results of search
From page.
All commands in a script are carried out on a cycle until then while variable SITE will not be empty.
For this purpose it is recommended to use necessarily in a script of a command
"DelDoClr" or "DelAndClr".
"ScriptN" - a script for extraction of the link on следующею page
Results.
"ScriptI" uses the same a script as "ScriptN".
|
|
| The Script for "ScriptI" and "ScriptN" |
|
The script consists of commands, each command to be on one line.
Each command consists of three subcommand and one value.
The first subcommand means target parameter (necessarily is present).
The second subcommand means entrance parameter (necessarily is present).
The third subcommand means the operator of action (necessarily is present).
Value is used for performance of the operator with variables (can be empty).
Subcommand should be concluded in "<>" and be divided{shared} ":".
|
|
Structure of a code:
<Out:In:Command>Value
<(Proceeding variable):(Entering variable):(Command)>(Value)
Example: <title:dats:DelDoRez>class=Rez
Data undertake from entering variables, the command and data is carried out
Come back in proceeding variables.
Proceeding variable is that variable where the result if it "COM" that accordingly the result not where does not get gets, and the command is simply carried out.
Entering variable is that variable from where data for performance of a command, if it "DATS" that data this value undertake.
Command is any action passing above a variable "SITE" in which to be the text of a site, thus value is used. Accordingly if value has blanks they too are used, therefore unnecessary blanks need to be deleted in the end.
Value are any given used by a current command. They are stored in a variable "DATS", a chance when they empty. For example use of a command{team} "MAP1aMAP2" when there are two cells of memory "<com:dats:map1amap2>".
One line one command, in each line the variable "DATS" that these given to use in other commands it is necessary to place them in "MAP1" or "MAP2".
The List of all commands refers to as a script. The script to be carried out cyclically while the variable "SITE" will not be empty (at the big cycle the stop will occur automatically not waiting clearing "SITE". On it to allocate blocks (results) it is recommended to use commands "DelDoClr" and "DelAndClr".
Explanatories of work of a command "DelAndClr". If the command does not find "Value" (Value) in a variable "SITE" that it clears and creaks stops (thus is defined that all results are taken with page). If the command finds "Value" (Value) that it deletes all up to this value in revenge with it inclusive.
|
|
| "Proceeding" |
| SITE |
The entering variable containing a code of a site. |
| COM |
Single command. |
| MAP1 |
Temporary variable. |
| MAP2 |
Temporary variable. |
| URL |
Variable "Address of result". |
| TITLE |
Variable "Heading of result". |
| TEXT |
Variable "Description of result". |
|
|
| "Entering" |
| DATS |
The entering variable containing value of a command. |
| MAP1 |
Temporary variable. |
| MAP2 |
Temporary variable. |
|
|
| "Commands" |
DelDo - to remove up to.
To remove all up to specified in values (Value) if it is found.
Example: <Com:Dats:DelDo><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: <a href = "http://urelnext.ru/?n=2" >2</a>
|
DelDoClr - to remove up to or to remove all.
To remove all up to specified in values (Value), or will clear all variable "SITE".
Example 1: <Com:Dats:DelDoClr><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: <a href = "http://urelnext.ru/?n=2" >2</a>
Example 2: <Com:Dats:DelDoClr><b
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: the Variable "SITE" is empty also a script is stopped.
|
DelDoRez - to remove up to and removed to bring in result.
To remove all up to specified in values (Value) and removed to bring in result if it is found.
Example: <Map1:Dats:DelDoRez><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: variable <MAP1>=Next page:
|
DelAnd - to remove with.
To remove all up to with the specified value (Value) if it is found.
Example: <Com:Dats:DelAnd><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: href = "http://urelnext.ru/?n=2" >2</a>
|
DelAndClr - to remove with or to remove all.
To remove all up to with the specified value (Value), or will clear all variable "SITE".
Example 1: <Com:Dats:DelAndClr><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: href = "http://urelnext.ru/?n=2" >2</a>
Example 2: <Com:Dats:DelAndClr><b
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: the Variable " SITE " is empty also a script is stopped.
|
DelAndRez - to remove with and removed to bring in result.
To remove all up to with the specified value (Value) and removed to bring in result if it is found.
Example: <Map1:Dats:DelAndRez><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: variable <MAP1>=Next page: <a
|
DelAndAll - to remove all before last concurrence inclusive.
To remove all before last concurrence inclusive specified in values (Value) if it is found.
Example: <Com:Dats:DelAndAll><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a> <a href = "http://urelnext.ru/?n=3" >3</a> <a href = "http://urelnext.ru/?n=4" >4</a>
Result: href = "http://urelnext.ru/?n=4" >4</a>
|
DelAndAllRez - to remove all before last concurrence inclusive.
To remove all before last concurrence inclusive specified in values (Value) if it is found.
Example: <Map1:Dats:DelAndAllRez><a
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a> <a href = "http://urelnext.ru/?n=3" >3</a> <a href = "http://urelnext.ru/?n=4" >4</a>
Result: variable <MAP1>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a> <a href = "http://urelnext.ru/?n=3" >3</a> <a
|
InToRez - to return in result value.
To place value (Value) in result.
Example: <Map1:Dats:InToRez>http://urels.ru
Result: a variable <MAP1>=http://urels.ru
|
ParamHToRez - to return value of attribute HTML of a command in result.
To place value (Value) attribute HTML of a command in result.
Example: <Url:Dats:ParamHToRez>href
It is given: a variable <SITE>= href = "http://urelnext.ru/?n=2" >2</a>
Result: http://urelnext.ru/?n=2
|
MapToRez - to copy MAP1 in result.
To place MAP1 in result.
Example: <Map2:Dats:MapToRez>
It is given: a variable <MAP1>=urls.ru
Result: a variable <MAP2>=urls.ru
|
Map1AMap2 - to combine MAP1 and MAP2 in result.
To combine MAP1 + MAP2 then to place in result.
Example: <Com:Dats:Map1AMap2>
It is given: a variable <MAP1>=http://urls.ru
a variable <MAP2>=/?n=2
Result: http://urls.ru/?n=2
|
Map2AMap1 - to combine MAP2 and MAP1 in result.
To combine MAP2 + MAP1 then to place in result.
Example: <Com:Dats:Map2AMap1>
It is given: a variable <MAP2>=http://urls.ru
a variable <MAP1>=/?n=2
Result: http://urls.ru/?n=2
|
Map1HexToRez - MAP1 to convert from HEX in result.
|
CopyDelIfMD - to return in result c if it is found map and equally given.
To return in result c if it is found map and equally given.
Example: <Com:Dats:CopyDelIfMD> [<a
It is given: a variable <MAP1>= [
variable <SITE>=Next page: [<a href = "http://urelnext.ru/?n=2" >2</a>] [<a href = "http://urelnext.ru/?n=3" >3</a>] [<b>4</b>]
Result: variable <SITE>=<b>4</b>]
|
ChangD - data in MAP2 to return to result after DATS to be replaced on MAP1.
|
ClrRez - to return empty result.
To place in result emptiness.
Example: <Map2:Dats:ClrRez>
It is given: a variable <MAP2>=http://urls.ru
Result: (the Variable "Map2" is empty)
|
Stop - variable SITE to make empty.
Variable SITE to make empty then script to stop.
Example: <Com:Dats:Stop>
It is given: variable <SITE>=Next page: <a href = "http://urelnext.ru/?n=2" >2</a>
Result: (the Variable "SITE" is empty, the script is stopped)
|