https://github.com/anikhasibul/bing
package bing provides web search functionalities by scraping bing search engine.
https://github.com/anikhasibul/bing
bing golang scrapper search-engine
Last synced: about 1 month ago
JSON representation
package bing provides web search functionalities by scraping bing search engine.
- Host: GitHub
- URL: https://github.com/anikhasibul/bing
- Owner: AnikHasibul
- License: mit
- Created: 2018-10-31T14:05:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-29T19:53:54.000Z (over 6 years ago)
- Last Synced: 2025-04-09T23:36:25.986Z (6 months ago)
- Topics: bing, golang, scrapper, search-engine
- Language: Go
- Size: 6.84 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bing
--
import "github.com/anikhasibul/bing"package bing provides web search functionalities by scraping bing search engine.
## Usage
#### func Search
```go
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
```go
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
```go
func Unique(sites []string) []string
```
Unique removes duplicate values from the given list.#### func HostOnly
```go
func HostOnly(list []string) []string
```
HostOnly returns only valid hostname from a result list.