scrape

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllaBolagScraper

type AllaBolagScraper struct{}

AllaBolagScraper is an implementation of CompanyInfoScraper fetching info from allabolag.se.

func NewAllaBolagScraper

func NewAllaBolagScraper() *AllaBolagScraper

NewAllaBolagScraper returns a new AllaBolagScraper

func (*AllaBolagScraper) Details

func (s *AllaBolagScraper) Details(comp Company) (*CompanyDetails, error)

Details returns details about a specific company.

func (*AllaBolagScraper) Search

func (s *AllaBolagScraper) Search(term string) ([]Company, error)

Search takes a search term as a parameter and searches allabolag.se for companies.

type Company

type Company struct {
	Name string
	Link string
}

Company represents a company.

type CompanyDetails

type CompanyDetails struct {
	Company
	FiscalDetails []FiscalDetails
}

CompanyDetails represents further details about a company.

type CompanyInfoScraper

type CompanyInfoScraper interface {
	Search(term string) ([]Company, error)
	Details(c Company) (*CompanyDetails, error)
}

CompanyInfoScraper represents a generic scraper of company information.

type FiscalDetails

type FiscalDetails struct {
	Year    int
	Revenue int
	Result  int
}

FiscalDetails represents the financial information about a company for one year.

type ParsedCompany added in v0.2.3

type ParsedCompany struct {
	Name string `json:"jurnamn"`
	Link string `json:"linkTo"`
}

Jump to

Keyboard shortcuts

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