diff options
| author | Philipp Tanlak <philipp.tanlak@gmail.com> | 2023-08-16 19:58:10 +0200 |
|---|---|---|
| committer | Philipp Tanlak <philipp.tanlak@gmail.com> | 2023-08-16 19:58:10 +0200 |
| commit | c36bb2ca2a82338a822c6962f3373809b4bed814 (patch) | |
| tree | d6cb54b7e9d7bf5742b06dedd6bf76eb09ea8385 /scrape_test.go | |
| parent | d82e66800478219dd924c6969bd91dbfe004fc9d (diff) | |
add allowed domains feature
Diffstat (limited to 'scrape_test.go')
| -rw-r--r-- | scrape_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scrape_test.go b/scrape_test.go index 5d6e578..643b10d 100644 --- a/scrape_test.go +++ b/scrape_test.go @@ -13,8 +13,9 @@ func TestScrape(t *testing.T) { svc := flyscrape.Scraper{ Concurrency: 10, ScrapeOptions: flyscrape.ScrapeOptions{ - URL: "http://example.com/foo/bar", - Depth: 1, + URL: "http://example.com/foo/bar", + Depth: 1, + AllowedDomains: []string{"example.com", "www.google.com"}, }, ScrapeFunc: func(params flyscrape.ScrapeParams) (any, error) { return map[string]any{ |