Skip to content

its0x08/duckduckgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DuckDuckGo URL scraper v0.0.1-beta

duckduckgo.py is a simple python module to scrape the duckduckgo search results. The ddg script can be used as a command line utility in a shell pipeline.


Warning!

This code is intended as a demonstration and, as all scraping utilities, should be used with great caution. By default the code will pause a few milliseconds each time it yields a result to avoid overloading the DDG servers.

Visitors CodeQL Semgrep Pylint Codacy Security Scan


Usage

git clone https://github.com/its0x08/duckduckgo
cd duckduckgo
python ddg.py -h
usage: ddg.py [-h] [-n MAX_RESULTS] [-t] [-o FILE_OUTPUT] keyword

DuckDuckGo URL scraper by 0x08

positional arguments:
  keyword         search string

options:
  -h, --help      show this help message and exit
  -n MAX_RESULTS  number of results (default: all)
  -t              execution time (default: False)
  -o FILE_OUTPUT  save output to file

Simple search

python ddg.py search something

Showing execution time by using -t flag and result number by using -n [Num].

python ddg.py -n 10 -t search something

Save output to file by using -o flag.

python ddg.py -n 10 -o output_file.log search something

TODO

  • Add installer script
  • Add -o to save output to file

Contributors

If you decide to make a pull request to suggest your changes to the project, please don't forget to add your name to the CONTRIBUTING.md file.

Pull Requests & Issues

You have a new feature in mind?

The code is buggy, wont run as expected and you happen to know python?

Please make a Pull Request (PR) suggesting you changes.

Otherwise you can always open an Issue to help improve this project.