Exporters made optional, as some scrapers only want to see data in console.

This commit is contained in:
Musab Gültekin
2019-06-11 18:59:37 +03:00
parent b8305d5e1a
commit bbdc3bcacd
4 changed files with 19 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/PuerkitoBio/goquery"
"github.com/fpfeng/httpcache"
"github.com/geziyor/geziyor"
"github.com/geziyor/geziyor/exporter"
"math/rand"
"testing"
"time"
@@ -36,6 +37,7 @@ func TestQuotes(t *testing.T) {
geziyor.NewGeziyor(geziyor.Options{
StartURLs: []string{"http://quotes.toscrape.com/"},
ParseFunc: quotesParse,
Exporters: []geziyor.Exporter{exporter.JSONExporter{}},
}).Start()
}