crawler

package
v0.0.0-...-519d24f Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package crawler provides types and functions to run crawler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(fetcher fetcher.Fetcher, scraper Scraper) (interface{}, error)

Run execute the fetcher and pass the content to the scraper.

Types

type HTMLScraper

type HTMLScraper func(doc *goquery.Document) (interface{}, error)

HTMLScraper is a function wrapper for Scraper interface using goquery. [Deprecation] use github.com/yssk22/go/crawler/html.HTMLScraper instead

func (HTMLScraper) Scrape

func (f HTMLScraper) Scrape(r io.Reader) (interface{}, error)

Scrape implements Scraper#Scrape [Deprecation] use github.com/yssk22/go/crawler/html.HTMLScraper#Scrape instead

type Scraper

type Scraper interface {
	Scrape(r io.Reader) (interface{}, error)
}

Scraper is an interface to scrape a content

type ScraperFunc

type ScraperFunc func(r io.Reader) (interface{}, error)

ScraperFunc is a function wrapper for Scraper interface

func (ScraperFunc) Scrape

func (f ScraperFunc) Scrape(r io.Reader) (interface{}, error)

Scrape implements Scraper#Scrape

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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