Skip to main content

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)

Uploaded Source

Built Distribution

ddg_scraper-2.0.1-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page