add module file, add gob dump example, update the default datetime format

This commit is contained in:
Amrit Panesar committed 2021-08-10 03:15:50 -07:00
1 parent 2775e7c063
commit ff740d65a7
6 files changed
+52 -5

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
package main
import (
"log"
cboxscraper "github.com/Neo-Desktop/go-cbox-scraper"
)
func main() {
// this example configuration is for a "new" style cbox
// this will not work with the program as-is
info := cboxscraper.CBoxServerInfo{
WebHostID: 6,
BoxID: 850801,
BoxTag: "hD3VIj",
Debug: false,
}
scraper := cboxscraper.NewScraper(info, -1, -1)
err := scraper.Load("../test.gob")
if err != nil {
log.Println("Load failed:", err)
}
err = scraper.Scrape(true)
if err != nil {
log.Println("Scraper failed:", err)
}
// change this value before saving
scraper.Debug = true
err = scraper.Save("../test.gob")
if err != nil {
log.Println("Save failed:", err)
}
}