utils

package
v0.0.0-...-ef3f196 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAllURLs

func ExtractAllURLs(scriptURLs []string, clients []HTTPClient, baseURL string) map[string]map[string]bool

func ExtractURLs

func ExtractURLs(jsContent string, clients []HTTPClient) map[string]map[string]bool

func FetchHTML

func FetchHTML(u string) (string, error)

func FetchJS

func FetchJS(u string) (string, error)

func ParseScripts

func ParseScripts(htmlContent, baseURL string) []string

func ResolveURL

func ResolveURL(u string) (string, error)

Types

type HTTPClient

type HTTPClient struct {
	Name           string `json:"name"`
	MethodRe       string `json:"methodRe"`
	URLRe          string `json:"urlRe"`
	URLMethodIndex []int  `json:"urlMethodIndex"`
	// contains filtered or unexported fields
}

func LoadClients

func LoadClients(configFile string) ([]HTTPClient, error)

Jump to

Keyboard shortcuts

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