utils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsRussian

func ContainsRussian(s string) bool

func ConvertTorrentToMagnet

func ConvertTorrentToMagnet(torrent []byte) (string, string, error)

func DecryptPrivateBin

func DecryptPrivateBin(url string, password string) (string, error)

func FormatSize

func FormatSize(size int64) string

func LevenshteinDistance

func LevenshteinDistance(str1, str2 string) int

func MegaDownload

func MegaDownload(url string, path string) (string, []string, error)

func OuoBypass

func OuoBypass(ouoURL string) (string, error)

func ReCaptcha

func ReCaptcha(anchorUrl string) (string, error)

func Similarity

func Similarity(str1, str2 string) float64
func SolveKeepLinks(url string) (string, error)

func SubSizeStrings

func SubSizeStrings(sizes []string) (string, error)

func Unique

func Unique[T comparable](slice []T) []T

Types

type FetchConfig

type FetchConfig struct {
	Method     string
	Url        string
	Data       interface{}
	RetryTimes int
	Headers    map[string]string
	Cookies    map[string]string
}

type FetchResponse

type FetchResponse struct {
	StatusCode int
	Data       []byte
	Header     http.Header
	Cookie     []*http.Cookie
}

func Fetch

func Fetch(cfg FetchConfig) (*FetchResponse, error)

type PrivateBinData

type PrivateBinData struct {
	Ct    string        `json:"ct"`
	Adata []interface{} `json:"adata"`
}

Jump to

Keyboard shortcuts

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