Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

src.userspace.com.au/colly-bolt-storage

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

src.userspace.com.au/colly-bolt-storage

Go Modules
Version
v0.0.0-20200406234757-579422c8b699
Version published
Created
Source

BoltDB storage for Colly

A BoltDB storage back-end for the Colly web crawling/scraping framework.

It implements both the storage and queue interfaces.

Example Usage:

package main

import (
	"github.com/gocolly/colly/v2"
	"github.com/gocolly/colly/v2/debug"
	"github.com/gocolly/colly/v2/extensions"
	"github.com/gocolly/colly/v2/proxy"
	"github.com/gocolly/colly/v2/queue"
	bolt "src.userspace.com.au/colly-bolt-storage"
)

func main() {
	c := colly.NewCollector(
		colly.AllowedDomains("www.example.com"),
	)

	storage, err := bolt.New("./state.bdb")
	if err != nil {
		panic(err)

	}
	defer storage.Close()

	err := c.SetStorage(storage)
	if err != nil {
		panic(err)
	}

	// ...
}

FAQs

Package last updated on 06 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts