pkg

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package pkg contains the ffclient and helper methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHtmlTitle

func GetHtmlTitle(r io.Reader) (string, bool, error)

Types

type FFDownloader

type FFDownloader struct {
	// contains filtered or unexported fields
}

FFDownloader represents a downloader for resources from https://fuckingfast.co/ It handles URL validation, content fetching, and file downloading.

func NewFF

func NewFF(pageUrl string, spinner *mpb.Bar) (*FFDownloader, error)

NewFF creates a new FFDownloader instance and validates the provided page URL. It takes a page URL string and a progress bar spinner as parameters. Returns a new FFDownloader instance and an error if validation fails.

func (*FFDownloader) Download

func (ff *FFDownloader) Download(path string, bar *mpb.Bar) error

Download performs the actual file download to the specified path. It takes a destination path and a progress bar as parameters. Returns an error if the download fails at any stage.

func (*FFDownloader) DownloadUrl

func (ff *FFDownloader) DownloadUrl() string

DownloadUrl returns the download URL extracted from the page.

func (*FFDownloader) FileName

func (ff *FFDownloader) FileName() string

FileName returns the filename extracted from the page content.

func (*FFDownloader) IsValid

func (ff *FFDownloader) IsValid() bool

IsValid returns whether the FFDownloader has a valid configuration.

func (*FFDownloader) PageUrl

func (ff *FFDownloader) PageUrl() string

PageUrl returns the page URL associated with the FFDownloader.

Jump to

Keyboard shortcuts

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