Skip to content

Instantly share code, notes, and snippets.

View kspviswa's full-sized avatar

Viz kspviswa

  • Remote
View GitHub Profile
@kspviswa
kspviswa / ddg_4.4.1_issue_gist.py
Last active February 11, 2024 02:51
Gist explaining the issue with v4.4.1 of duckduckgo_search
import threading
from duckduckgo_search import DDGS
def do_Search():
with DDGS() as ddgs:
searchResults = [r for r in ddgs.text('What is duckduckgo?', max_results=5)]
print(searchResults)
def main():
x = threading.Thread(target=do_Search) # -> Issue reproduced if not running main thread