MCPcopy Create free account

hub / github.com/deedy5/ddgs / functions

Functions153 in github.com/deedy5/ddgs

↓ 24 callersMethodget
Make a GET request to the HTTP client.
ddgs/http_client.py:73
↓ 16 callersFunction_expand_proxy_tb_alias
Expand "tb" to a full proxy URL if applicable.
ddgs/utils.py:68
↓ 12 callersFunction_get_ddgs
Create a DDGS instance with proxy configuration from environment.
ddgs/api_server/api.py:38
↓ 12 callersMethodappend
Add an item to the cache. Register an occurrence of `item`. First time we see its key, we store the item; every time we bump the coun
ddgs/results.py:128
↓ 7 callersMethodextract
Fetch a URL and extract its content. Args: url: The URL to fetch and extract content from. fmt: Output format: "text_
ddgs/ddgs.py:246
↓ 7 callersMethodtext
Perform a text search.
ddgs/ddgs.py:226
↓ 6 callersFunction_save_data
(query: str, data: list[dict[str, str]], function_name: str, filename: str | None)
ddgs/cli.py:51
↓ 6 callersMethodimages
Perform an image search.
ddgs/ddgs.py:230
↓ 6 callersMethodrequest
Make a request to the search engine.
ddgs/base.py:65
↓ 5 callersFunction_print_data
(data: list[dict[str, str]], *, no_color: bool = False)
ddgs/cli.py:74
↓ 5 callersFunction_sanitize_query
(query: str)
ddgs/cli.py:101
↓ 5 callersMethod_search_sync
Perform a search across engines in the given category. Args: category: The category of search engines (e.g., 'text', 'images', et
ddgs/ddgs.py:135
↓ 5 callersMethodbooks
Perform a book search.
ddgs/ddgs.py:242
↓ 5 callersMethodnews
Perform a news search.
ddgs/ddgs.py:234
↓ 5 callersMethodvideos
Perform a video search.
ddgs/ddgs.py:238
↓ 4 callersMethod__setattr__
Override setattr to apply normalization functions to certain attributes.
ddgs/results.py:30
↓ 4 callersFunction_download_results
( query: str, results: list[dict[str, str]], function_name: str, proxy: str | None = None,
ddgs/cli.py:127
↓ 3 callersFunction_extract_vqd
Extract vqd from html bytes.
ddgs/utils.py:15
↓ 3 callersMethod_load_real
(cls)
ddgs/__init__.py:27
↓ 3 callersMethodextract_tree
Extract html tree from html text.
ddgs/base.py:77
↓ 2 callersFunction_save_csv
(csvfile: str | Path, data: list[dict[str, str]])
ddgs/cli.py:65
↓ 2 callersFunction_save_json
(jsonfile: str | Path, data: list[dict[str, str]])
ddgs/cli.py:60
↓ 2 callersMethodrequest
Make a request to the HTTP client.
ddgs/http_client.py:62
↓ 2 callersMethodsearch
Search the engine.
ddgs/base.py:103
↓ 1 callersMethod_extract_tokens
Split on non-word characters & filter out short tokens.
ddgs/similarity.py:24
↓ 1 callersMethod_get_engines
Retrieve a list of search engine instances for a given category and backend. Args: category: The category of search engines (e.g.
ddgs/ddgs.py:72
↓ 1 callersMethod_get_key
(self, item: T)
ddgs/results.py:117
↓ 1 callersMethod_get_vqd
Get vqd value for a search query using DuckDuckGo.
ddgs/engines/duckduckgo_videos.py:38
↓ 1 callersMethod_get_vqd
Get vqd value for a search query using DuckDuckGo.
ddgs/engines/duckduckgo_news.py:31
↓ 1 callersMethod_get_vqd
Get vqd value for a search query using DuckDuckGo.
ddgs/engines/duckduckgo_images.py:42
↓ 1 callersMethod_has_any_token
Check if any token is a substring of the lower-cased text.
ddgs/similarity.py:28
↓ 1 callersMethodbuild_payload
Build a payload for the search request.
ddgs/base.py:53
↓ 1 callersFunctioncli
DDGS CLI tool.
ddgs/cli.py:162
↓ 1 callersMethodextend
Add a list of items to the cache.
ddgs/results.py:141
↓ 1 callersFunctionextract_date
Extract date from string.
ddgs/engines/bing_news.py:15
↓ 1 callersFunctionextract_date
Extract date from string.
ddgs/engines/yahoo_news.py:26
↓ 1 callersMethodextract_dicts
Return a list of items, sorted by descending frequency. Each item is returned as a dict.
ddgs/results.py:146
↓ 1 callersFunctionextract_image
Sanitize image url.
ddgs/engines/yahoo_news.py:46
↓ 1 callersMethodextract_results
Extract search results from html text.
ddgs/base.py:85
↓ 1 callersFunctionextract_source
Remove ' via Yahoo' from string.
ddgs/engines/yahoo_news.py:52
↓ 1 callersFunctionextract_url
Sanitize url.
ddgs/engines/yahoo.py:12
↓ 1 callersFunctionextract_url
Sanitize url.
ddgs/engines/yahoo_news.py:40
↓ 1 callersMethodget_sc
Get sc param.
ddgs/engines/startpage.py:31
↓ 1 callersFunctionget_ua
Return one User-Agent string.
ddgs/engines/google.py:13
↓ 1 callersMethodpost_extract_results
Post-process search results.
ddgs/base.py:99
↓ 1 callersMethodpre_process_html
Pre-process html_text before extracting results.
ddgs/base.py:81
↓ 1 callersMethodpre_process_html
Pre-process html_text before extracting results.
ddgs/engines/google.py:70
↓ 1 callersMethodrank
Rank a list of docs based on a query string.
ddgs/similarity.py:33
↓ 1 callersMethodresult_type
Get result type based on category.
ddgs/base.py:41
↓ 1 callersFunctionsafe_entry_point
Run the CLI tool in try-except block to catch all exceptions.
ddgs/cli.py:166
↓ 1 callersFunctionunwrap_bing_url
Decode the Bing-wrapped raw_url to extract the original url.
ddgs/engines/bing.py:13
Method__call__
(cls, *args: Any, **kwargs: Any)
ddgs/__init__.py:35
Method__dir__
(cls)
ddgs/__init__.py:42
Method__enter__
Enter the context manager and return the DDGS instance.
ddgs/ddgs.py:60
Method__exit__
Exit the context manager.
ddgs/ddgs.py:64
Method__getattr__
(cls, name: str)
ddgs/__init__.py:39
Method__init__
(self, cache_fields: set[str])
ddgs/results.py:109
Method__init__
(self, proxy: str | None = None, timeout: int | None = None, *, verify: bool | str = True)
ddgs/base.py:35
Method__init__
(self, min_token_length: int = 3)
ddgs/similarity.py:21
Method__init__
( self, proxy: str | None = None, timeout: int | None = 5, *, verify:
ddgs/ddgs.py:46
Method__init__
(self, resp: Any)
ddgs/http_client.py:18
Method__init__
Initialize the HttpClient object. Args: proxy (str, optional): proxy for the HTTP client, supports http/https/socks5 protocols.
ddgs/http_client.py:43
Method__len__
Return the number of items in the cache.
ddgs/results.py:124
Function_convert_tuple_to_csv
(_ctx: click.Context, _param: click.Parameter, value: tuple[str] | None)
ddgs/cli.py:45
Function_download_file
(url: str, dir_path: str, filename: str, proxy: str | None, *, verify: bool)
ddgs/cli.py:114
Function_normalize_date
Normalize date from integer to ISO format if applicable.
ddgs/utils.py:63
Function_normalize_text
Normalize text. Strip HTML tags, unescape HTML entities, normalize Unicode, remove "c" category characters, and collapse whitespace.
ddgs/utils.py:36
Function_normalize_url
Unquote URL and replace spaces with '+'.
ddgs/utils.py:31
Functionapi
Start/stop the DDGS API server. Starts a FastAPI server with REST endpoints for search tools. Supports text, image, news, video, and book sea
ddgs/cli.py:606
Functionbooks
CLI function to perform a DDGS books metasearch.
ddgs/cli.py:507
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/bing_images.py:22
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_videos.py:43
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/yahoo.py:35
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/yandex.py:32
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/brave.py:27
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_news.py:36
Methodbuild_payload
Build a payload for the Bing search request.
ddgs/engines/bing_news.py:53
Methodbuild_payload
Build a payload for the Bing search request.
ddgs/engines/bing.py:50
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo_images.py:47
Methodbuild_payload
Build a payload for the Google search request.
ddgs/engines/google.py:43
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/grokipedia.py:24
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/annasarchive.py:33
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/wikipedia.py:25
Methodbuild_payload
Build a payload for the Startpage search request.
ddgs/engines/startpage.py:39
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/duckduckgo.py:23
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/yahoo_news.py:77
Methodbuild_payload
Build a payload for the search request.
ddgs/engines/mojeek.py:27
Functionextract
CLI function to extract content from a URL.
ddgs/cli.py:546
Functionextract_content
Extract content from a URL. Args: url: The URL to fetch and extract content from. fmt: Output format: "text_markdown", "text_plai
ddgs/api_server/mcp.py:230
Functionextract_content
Extract text content from a URL.
ddgs/api_server/api.py:423
Functionextract_content_get
Extract text content from a URL via GET request.
ddgs/api_server/api.py:438
Methodextract_results
Extract search results from html text.
ddgs/engines/bing_images.py:45
Methodextract_results
Extract search results from lxml tree.
ddgs/engines/duckduckgo_videos.py:73
Methodextract_results
Extract search results from lxml tree.
ddgs/engines/duckduckgo_news.py:61
Methodextract_results
Extract search results from html text.
ddgs/engines/duckduckgo_images.py:84
Methodextract_results
Extract search results from html text.
ddgs/engines/grokipedia.py:37
Methodextract_results
Extract search results from html text.
ddgs/engines/wikipedia.py:44
Functionhealth_check
Health check endpoint.
ddgs/api_server/api.py:142
Functionimages
CLI function to perform a DDGS images metasearch.
ddgs/cli.py:319
Functionmcp
Start DDGS MCP server over stdio for local MCP clients. Examples: ddgs mcp # Start MCP server using stdio tran
ddgs/cli.py:567
next →1–100 of 153, ranked by callers