HtmlExtract

Top  Previous  Next

function HtmlExtract(sHtmlSource, sCheckUrl As String, iOption As Integer) As String

 

Extracts the specified information from the HTML source code sHtmlSource.

 

The parameter sCheckUrl is the address of the related page and is required to generate absolute link addresses.

 

Parameters

 

sHtmlSource ... HTML source code of the checked page.
sCheckUrl ... URL of the checked page. Required to generate absolute link addresses.
iOption ... Integer value. Specifies the information that should be extracted.

 

Valid values of iOption:

Value (numeric)

Description

0

Extracts all link addresses (one URL per line).

The result is sorted and doesn't contain duplicates. URLs are separated with a carriage return/line feed.

1

Extracts all image addresses (one URL per line).

The result is sorted and doesn't contain duplicates. URLs are separated with a carriage return/line feed.

 

Example:

Dim sUrlList

 

sUrlList = HtmlExtract(sMem, Bookmark_GetProperty(Handle, "check_url"), 0)




Translate document: