Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thibauts/duckduckgo
Simple duckduckgo results scraping
https://github.com/thibauts/duckduckgo
Last synced: 2 months ago
JSON representation
Simple duckduckgo results scraping
- Host: GitHub
- URL: https://github.com/thibauts/duckduckgo
- Owner: thibauts
- Created: 2012-12-06T11:01:49.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-09-05T02:33:58.000Z (over 7 years ago)
- Last Synced: 2023-04-10T03:12:19.052Z (over 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 64
- Watchers: 5
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
duckduckgo.py
=============duckduckgo.py is a simple python module to scrape the duckduckgo search results. The install script will also make available a ddg command line utility that can be conveniently used in a shell pipeline.
A word of 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.
Usage
-----It can be used as a python module
.. code-block:: pycon
>>> import duckduckgo
>>> for link in duckduckgo.search('duckduckgo', max_results=10):
... print link
...
https://duckduckgo.com/
https://en.wikipedia.org/wiki/DuckDuckGo
https://duckduckgo.com/about.html
[...]Or as a command line tool
.. code-block:: bash
$ ddg -n 10 duckduckgo
Installation
------------.. code-block:: bash
$ python setup.py install