bing

package module
v0.0.0-...-355c82d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2019 License: MIT Imports: 8 Imported by: 0

README

bing

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

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

Usage

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.

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostOnly

func HostOnly(list []string) []string

HostOnly returns only valid hostname from a result list.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL