scrapper

package
v0.0.0-...-82988be Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScrapeFeed

func ScrapeFeed(ctx context.Context, db *database.Queries, feed database.Feed) error

Types

type FeedInfo

type FeedInfo struct {
	Title       string
	Description string
}

func FetchFeedInfo

func FetchFeedInfo(ctx context.Context, url string) (*FeedInfo, error)

type Rss

type Rss struct {
	Channel struct {
		Title         string `xml:"title"`
		Link          string `xml:"link"`
		Description   string `xml:"description"`
		LastBuildDate string `xml:"lastBuildDate"`
		Items         []struct {
			Title       string `xml:"title"`
			Link        string `xml:"link"`
			PubDate     string `xml:"pubDate"`
			Description string `xml:"description"`
		} `xml:"item"`
	} `xml:"channel"`
}

Jump to

Keyboard shortcuts

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