A simple package to scrape and get price data from Iranjib website.
go get github.com/mamal72/gojib
# or use dep, vgo, glide or anything else
package main
import (
"log"
"github.com/mamal72/gojib"
)
func main() {
iranianCarsPrices, _ := gojib.GetIranianCarsPrices() // returns []CarPrice, error
log.Println("Iranian Cars:")
for _, car := range iranianCarsPrices {
log.Printf("%+v", car)
}
foreignCarsPrices, _ := gojib.GetForeignCarsPrices() // returns []CarPrice, error
log.Println("Foreign Cars:")
for _, car := range foreignCarsPrices {
log.Printf("%+v", car)
}
}
Just create an issue and describe it. I'll check it ASAP!
You can fork the repository, improve or fix some part of it and then send the pull requests back (with some tests ofc) if you want to see them here. I really appreciate that. ❤️