factotum

package
v0.0.0-...-78897e3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrint

func PrettyPrint(i interface{}) string

PrettyPrint prints something nice

func PrintGetReq

func PrintGetReq(path string)

PrintGetReq prints Get Program in differernt languages (e.g. Go, Python)

func Run

func Run(ctx context.Context, url string, timeout int, verbose, jsonOnly bool) error

Run actualls runs the crawler with headless mode, wait til timeout and capture the GET requests during the time with chrome devtool protocol jsonOnly will return json output only, otherwise will also return python/go sample program for the GET requests

Types

type ReqHead

type ReqHead struct {
	URL     string `json:"url"`
	Method  string `json:"method"`
	Headers struct {
		Referer        string `json:"Referer"`
		XRequestedWith string `json:"X-Requested-With"`
		UserAgent      string `json:"User-Agent"`
		Accept         string `json:"Accept"`
	} `json:"headers"`
	MixedContentType string `json:"mixedContentType"`
	InitialPriority  string `json:"initialPriority"`
	ReferrerPolicy   string `json:"referrerPolicy"`
}

ReqHead as request header for the captured GET requests

Jump to

Keyboard shortcuts

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