A Python library for scraping the DuckDuckGo search engine.
Project description
websearch
websearch is a Python library for searching DuckDuckGo, easily. websearch uses requests and BeautifulSoup4 to scrape DuckDuckGo.
Installation
To install, run the following command:
python3 -m pip install pyduckduckgosearch
usage
To get results for a search term, simply use the search function in websearch. For example, to get results for "DuckDuckGo" in DuckDuckGo, just run the following program:
from websearch import search
keywords = 'what is machine learning'
results = search(keywords, region='wt-wt', safesearch='Moderate', time='y', max_results=2)
print(results.__next__().__dict__)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyduckduckgosearch-1.2.1.tar.gz
.
File metadata
- Download URL: pyduckduckgosearch-1.2.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.27.1 rfc3986/1.5.0 tqdm/4.64.0 urllib3/1.26.8 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18c47b967e1a0dbee440025926564614826227d29992f169f5646890cea7ec4f |
|
MD5 | a8d8ed77f6c0765f320f8b47984d0810 |
|
BLAKE2b-256 | 567e93a10a23f2f53a06caa018f37fe56e5f3be0e239abf8ab483463f7e77218 |