scraper

package
v0.0.0-...-e55a098 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

scraper/fetch.go

scraper/parse.go

scraper/write.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractArticles

func ExtractArticles(doc *html.Node) []models.Article

ExtractArticles extracts articles from the given HTML document.

func FetchHTML

func FetchHTML(url string) (*html.Node, error)

FetchHTML fetches the HTML content of the given URL and returns a parsed HTML node.

func WriteToCSV

func WriteToCSV(articles []models.Article, filename string)

WriteToCSV writes the scraped articles to a CSV file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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