Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Extracting outgoing links from retrieved webpages

The task of the link extractor is to scan the body of each retrieved HTML document and extract the unique set of links contained within it. Each uniform resource locator (URL) in a web page can be classified into one of the following categories:

  • URL with a network path reference [1]: This type of link is quite easy to identify as it does not include a URL scheme (for example, <img src="//banner.png"/>). When the web browser (or crawler, in our case) needs to access the link, it will substitute the protocol used to access the web page that contained it. Consequently, if the parent page was accessed via HTTPS, then the browser will also request the banner image over HTTPS.
  • Absolute links: These ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content