AnikHasibul / bing

package bing provides web search functionalities by scraping bing search engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bing

-- import "github.com/anikhasibul/bing"

package bing provides web search functionalities by scraping bing search engine.

Usage

func Search

func Search(query string, blacklist []string) (results []string, err error)

Search searches a query on bing. NOTE: results may not be empty even if the error is not nil. Because, an error can be occured at 1000th page. So you can still be able to get the data of previous 999 pages. ;)

func SearchWithTimeout

func SearchWithTimeout(query string, blacklist []string, duration time.Duration) (results []string, err error)

SearchWithTimeout searches a query on bing with timeout, usefull for the long result queries. NOTE: results may not be empty even if the error is not nil. Because, an error can be occured at 1000th page. So you can still be able to get the data of previous 999 pages. ;)

func Unique

func Unique(sites []string) []string

Unique removes duplicate values from the given list.

func HostOnly

func HostOnly(list []string) []string

HostOnly returns only valid hostname from a result list.

About

package bing provides web search functionalities by scraping bing search engine.

License:MIT License


Languages

Language:Go 100.0%