|
If PicaLoader's default HTML Parser can not analyst a HTML page
correctly, you can write a piece of script to customize the
HTML Parser:
1.The
script's syntax is same as Lua.
2.You can use these variable in your script:
Variable
|
Means
|
Type
|
HTML.Content
|
HTML page's content.
|
String
|
HTML.Url
|
Current HTML page's URL.
|
String
|
HTML.Title
|
Current HTML page's title.
|
String
|
HTML.Referer
|
Current HTML page's referer
URL.
|
String
|
HTML.TaskID
|
The task ID that current HTML page
belong to.
|
Integer
|
HTML.Level
|
Level of current HTML page.
|
Integer
|
3.You can use these function in your script:
Function
|
Means
|
DefaultParser(string content,string URL,string title,integer
taskID,integer level)
|
Call the default HTML Parser.
|
AddLink(string URL,string
referer,string title,string postData,integer taskID,integer
level)
|
Add a link to downloading
queue.
|
win.MessageBox(mainWnd, string
message, string title, 0)
|
Show a message box, help you to
debug your script.
|
4.Sample: same as default HTML Parser:
DefaultParser(HTML.Content, HTML.Url, HTML.Title, HTML.TaskID,
HTML.Level);
|