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 hashes)
Built Distribution
Close
Hashes for ddg_scraper-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20388470ee6cc60e3dd25871f6516b49af7e91efb663496533b5639e4cd46639 |
|
MD5 | 30d78fb09b691016cd36baa9922ac121 |
|
BLAKE2b-256 | fb254975a1dbb8f8816e7b4f1b3df652341717a210f835a8944c4d4e004ea280 |