scraper

package
v0.0.0-...-57d8560 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobCenter = 1
	Bruneida  = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BruneidaScraper

type BruneidaScraper struct {
	BaseURL     string
	FetchClient FetchClienter
}

func NewBruneidaScraper

func NewBruneidaScraper() BruneidaScraper

func (*BruneidaScraper) ScrapeJobs

func (s *BruneidaScraper) ScrapeJobs() ([]*model.Job, error)

type FetchClient

type FetchClient struct{}

func (*FetchClient) GetDocument

func (c *FetchClient) GetDocument(url string) (*goquery.Document, error)

type FetchClienter

type FetchClienter interface {
	GetDocument(url string) (*goquery.Document, error)
}

type JobCentreScraper

type JobCentreScraper struct {
	BaseURL     string
	FetchClient FetchClienter
}

func NewJobCentreScraper

func NewJobCentreScraper() JobCentreScraper

func (*JobCentreScraper) ScrapeJobs

func (s *JobCentreScraper) ScrapeJobs() ([]*model.Job, map[string]*model.Company, error)

type Scraper

type Scraper interface {
	// ScrapeJobs scrapes provider's website for job listings and company information if available.
	// Returned Job struct contains a Company struct with ProviderCompanyID only.
	// Company details are returned as a separate argument.
	ScrapeJobs() ([]*model.Job, error)
}

Jump to

Keyboard shortcuts

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