add additional note to example program
This commit is contained in:
1 parent
9e0a3448f7
commit
11cee3336d
1 file changed
+30
-1
+30
-1
@@ -1,5 +1,34 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
cboxscraper ".."
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
$END$
|
||||
// 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: true,
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
err = scraper.Save("test.gob")
|
||||
if err != nil {
|
||||
log.Println("Save failed:", err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user