June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to retrieve all the hyperlinks in a Web page (perhaps because you want to download those pages also).
Retrieve the page using WebResponse, and use a regular expression to search for URIs.
Retrieving links in a Web page is conceptually quite easy but often more difficult in practice. The problem is that Web pages follow a semi-standardized format and tolerate a great deal of variance. For example, a hyperlink can be added in the href attribute of an anchor, the onclick attribute of a JavaScript element such as a button, and so on. The URI itself could be relative (in which case it needs to be interpreted relative to the current page), fully qualified (in which case it can have one of ...
Read now
Unlock full access