README ¶ CMP Scraper This is a simple package used to scrape the Central Maine Power website for outage information. Usage package main import ( "log" "net/http" "github.com/HelixSpiral/cmpscraper" ) func main() { httpClient := &http.Client{} stats, _ := cmpscraper.GetStats(httpClient) log.Printf("%+v", stats) } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Constants type CMP func GetStats(httpClient *http.Client) (CMP, error) type Outage Constants ¶ View Source const URL = "https://ecmp.cmpco.com/OutageReports/CMP.html" Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type CMP ¶ type CMP struct { LastUpdate time.Time Total string WithoutPower string Counties map[string]Outage NoOutages bool } func GetStats ¶ func GetStats(httpClient *http.Client) (CMP, error) type Outage ¶ type Outage struct { Total string WithoutPower string } Source Files ¶ View all Source files scraper.go structs.go Directories ¶ Show internal Expand all Path Synopsis Examples NoProxy Proxy Click to show internal directories. Click to hide internal directories.