You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A command line utility for search on duckduckgo.com
Building in Python (lxml + requests + urllib)
Dependencies -
lxml
requests
urllib
API Documentation -
Installation
pip install duck_go_search
Use
fromduck_go_search.searchimportduck_go_search# creating a search objectsearch_obj=duck_go_search()
# setting up proxy (if any)search_obj.setup_proxy('http', 'http://proxyserver.com:8080')
search_obj.setup_proxy('https', 'https://proxyserver.com:8080')
# setting up the limit for number of resultssearch_obj.set_query_limit(7)
# creating a querysearch_obj.query(["keyword_1", "keyword_2"])
""" printing search results, a list of search objects is returned """# search linkprintsearch_obj.search_results[0].link# search titleprintsearch_obj.search_results[0].title# search descriptionprintsearch_obj.search_results[0].description# markup data printsearch_obj.search_results[0].html_data