webscraper

module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2023 License: GPL-3.0

README

Web Scraper and Web Parser Library

This library contains two packages for web scraping: webscraper and parser.

webscraper

This package contains one function:

GetHTMLNodeFromUrl(url string) (*html.Node, error)

This function takes a string representing a URL and returns the root *html.Node of the corresponding webpage.

parser

This package contains two functions:

GetLinksFromHtmlNode(node *html.Node) ([]string)

This function takes an *html.Node and returns a slice of strings representing the URLs of all the links on the webpage.

GetTextFromHtmlNode(node *html.Node) ([]string)

This function takes an *html.Node and returns a slice of strings containing the text of the webpage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL