Easy to use asynchronous and synchronous DuckDuckGo search engine scraper.
Project description
Asynchronous and Synchronous DuckDuckGo Search Engine Scraper
Scrapes the duckduckgo search engine.
Asynchronous Example
from ddg_scraper import DuckScraper
import trio
duck_scraper = DuckScraper()
async def main():
async with duck_scraper.search("python") as results:
async for result in results:
...
trio.run(main)
Synchronous Example
from ddg_scraper import DuckScraper
duck_scraper = DuckScraper()
with duck_scraper.search("python") as results:
for result in results:
...
In both examples, result
is ddg_scraper.SearchResult
Attributes and Methods of ddg_scraper.SearchResult
Attributes
title
url
favicon
snippet
How To Install
- Using pip:
pip install ddg-scraper
- Manual:
- Clone the folder somewhere
- CD to the location
- Install the packages listed in
requirements.txt
(pip install -r requirements.txt
) - Copy the folder, ddg_scraper where you want to use it.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ddg_scraper-2.0.1.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file ddg_scraper-2.0.1.tar.gz
.
File metadata
- Download URL: ddg_scraper-2.0.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
39da8a1be03513aa4306dabab0c0d5c19a4dfb4f8b942ca6ce77de201ce9d276
|
|
MD5 |
669ccef75624c610a592013ab4b3141f
|
|
BLAKE2b-256 |
d3ca9b2b348df4f56ccf6ec59650145bc3bd84ca6fcc74a9fe3250749b69c78d
|
File details
Details for the file ddg_scraper-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: ddg_scraper-2.0.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
20388470ee6cc60e3dd25871f6516b49af7e91efb663496533b5639e4cd46639
|
|
MD5 |
30d78fb09b691016cd36baa9922ac121
|
|
BLAKE2b-256 |
fb254975a1dbb8f8816e7b4f1b3df652341717a210f835a8944c4d4e004ea280
|