duckduckgo

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 16 Imported by: 0

README

duckduckgo

Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncDDGS

type AsyncDDGS struct {
	Executor *http.Client
	Proxies  map[string]string
	Timeout  int
}

* * DuckDuckgo_search async class to get search results from duckduckgo.com. *

func NewAsyncDDGS

func NewAsyncDDGS(headers map[string]string, proxies map[string]string, timeout int) *AsyncDDGS

func (*AsyncDDGS) Answers

func (a *AsyncDDGS) Answers(keywords string) ([]map[string]string, error)

func (*AsyncDDGS) Images

func (a *AsyncDDGS) Images(keywords string, region string, safesearch string, timelimit string, size string, color string, typeImage string, layout string, licenseImage string, maxResults int) ([]map[string]string, error)

*

  • region: wt-wt, us-en, uk-en, ru-ru, etc. Defaults to "wt-wt".
  • safesearch: on, moderate, off. Defaults to "moderate".
  • timelimit: Day, Week, Month, Year. Defaults to None.
  • size: Small, Medium, Large, Wallpaper. Defaults to None.
  • color: color, Monochrome, Red, Orange, Yellow, Green, Blue, Purple, Pink, Brown, Black, Gray, Teal, White. Defaults to None.
  • type_image: photo, clipart, gif, transparent, line. Defaults to None.
  • layout: Square, Tall, Wide. Defaults to None.

*

func (*AsyncDDGS) News

func (a *AsyncDDGS) News(keywords string, region string, safesearch string, timelimit string, maxResults int) ([]map[string]string, error)

*

  • region: wt-wt, us-en, uk-en, ru-ru, etc. Defaults to "wt-wt". safesearch: on, moderate, off. Defaults to "moderate". timelimit: d, w, m. Defaults to None.

func (*AsyncDDGS) Suggestions

func (a *AsyncDDGS) Suggestions(keywords string, region string) ([]map[string]string, error)

* * DuckDuckGo suggestions. Query params: https://duckduckgo.com/params. * region: wt-wt, us-en, uk-en, ru-ru, etc. Defaults to "wt-wt". *

func (*AsyncDDGS) Text

func (a *AsyncDDGS) Text(keywords string, region string, safesearch string, timelimit string, backend string, maxResults int) ([]map[string]string, error)

* * region: wt-wt, us-en, uk-en, ru-ru, etc. Defaults to "wt-wt". * timelimit: d, w, m, y. Defaults to None. * safesearch: "moderate", "off", "on". Defaults to "moderate". *

func (*AsyncDDGS) Translate

func (a *AsyncDDGS) Translate(keywords []string, from string, to string) (map[string]string, error)

* * from_: translate from (defaults automatically). Defaults to None. * to: what language to translate. Defaults to "en". * - zh-Hans * - zh-Hant * - de * - fr * - ja * - ko *

func (*AsyncDDGS) Videos

func (a *AsyncDDGS) Videos(keywords string, region string, safesearch string, timelimit string, resolution string, duration string, licenseVideos string, maxResults int) ([]map[string]interface{}, error)

region: wt-wt, us-en, uk-en, ru-ru, etc. Defaults to "wt-wt". safesearch: on, moderate, off. Defaults to "moderate". timelimit: d, w, m. Defaults to None. resolution: high, standart. Defaults to None. duration: short, medium, long. Defaults to None. license_videos: creativeCommon, youtube. Defaults to None.

Jump to

Keyboard shortcuts

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