Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BostadRegex = regexp.MustCompile(`^https:\/\/www\.hemnet\.se\/bostad\/\S*$`)
View Source
var BostaderRegex = regexp.MustCompile(`^https:\/\/www\.hemnet\.se\/bostader\S*$`)
Functions ¶
This section is empty.
Types ¶
type CostPerUnit ¶
type CostPerUnit struct { Cost int `json:"cost"` Currency string `json:"currency"` Unit string `json:"unit"` }
func NewCostPerUnit ¶
func NewCostPerUnit(cost int, currency, unit string) (CostPerUnit, error)
type Properties ¶
type Properties struct {
Properties []Property `json:"properties"`
}
func ScrapeSearch ¶
func ScrapeSearch(url string) (Properties, error)
type Property ¶
type Property struct { Address string `json:"address"` Price int `json:"price"` Type string `json:"type"` Tenure string `json:"tenure"` Rooms int `json:"rooms"` Area string `json:"area"` Year string `json:"constructionYear"` HousingCooperative string `json:"housingCooperative"` Fee CostPerUnit `json:"fee"` OperatingCost CostPerUnit `json:"operatingCost"` PriceSquareMeter CostPerUnit `json:"priceSquareMeter"` Visits int `json:"visists"` Realtor string `json:"realtor"` Agency string `json:"agency"` Removed bool `json:"removed"` RemovedDate string `json:"removedDate,omitempty"` }
func ScrapeProperty ¶
Click to show internal directories.
Click to hide internal directories.