Documentation ¶
Index ¶
- Variables
- func ExtractSources(input io.Reader, extractionPoints ...map[string][]string) (<-chan url.URL, error)
- func FetchResponse(u string, method string, headers http.Header) (*http.Response, error)
- func Filter(input <-chan url.URL, options ...func([]url.URL) []url.URL) (<-chan url.URL, error)
- func WithComplete(base *url.URL) func([]url.URL) []url.URL
- func WithResolve() func([]url.URL) []url.URL
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtractionPoints = map[string][]string{
"script": {"src", "data-src"},
}
ExtractionPoints defines the default HTML tags and their attributes from which JavaScript sources are extracted.
Functions ¶
func ExtractSources ¶
func ExtractSources(input io.Reader, extractionPoints ...map[string][]string) (<-chan url.URL, error)
ExtractSources extracts all JavaScript sources found in the provided HTTP response reader. The optional extractionPoints can be used to overwrite the default extraction points map with a set of HTML tag names, together with a list of what attributes to extract from.
func FetchResponse ¶
FetchResponse fetches the HTTP response for the given URL.
func WithComplete ¶
WithComplete is an option to complete relative URLs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.