Skip to main content

Python API wrapper for darksearch.io

Project description

https://travis-ci.com/thehappydinoa/DarkSearch.svg?branch=master

Python API wrapper for darksearch.io

API Documentation

Install

pip install darksearch

Usage

 import darksearch

 results = darksearch.search("query")

 """
 `results` is a JSON dict object like this
 {
   "total": int,
   "per_page": int,
   "current_page": int,
   "last_page": int,
   "from": int,
   "to": int,
   "data": [
       {
           "title": string,
           "link": string,
           "description": string
       }
    ]
}
 """

 results_page_2 = darksearch.search("query", page=2)

 """
 `results_page_2` is a JSON dict object like this
 {
   "total": int,
   "per_page": int,
   "current_page": 2,
   "last_page": int,
   "from": int,
   "to": int,
   "data": [
       {
           "title": string,
           "link": string,
           "description": string
       }
    ]
}
 """

 results_pages = darksearch.search("query", pages=2)

 """
 `results_pages` is a list of JSON dict objects like this
 [
 {
   "total": int,
   "per_page": int,
   "current_page": 1,
   "last_page": int,
   "from": int,
   "to": int,
   "data": [
       {
           "title": string,
           "link": string,
           "description": string
       }
    ]
 },
 ...
 ]
 """

 results_pages = darksearch.search("query", pages=2, wait=2)

 """
 `wait` is the seconds between requests (DarkSearch's API is limited to 30 requests per minute.)
 `results_pages` is a list of JSON dict objects
 [
 {
   "total": int,
   "per_page": int,
   "current_page": 1,
   "last_page": int,
   "from": int,
   "to": int,
   "data": [
       {
           "title": string,
           "link": string,
           "description": string
       }
    ]
 },
 ...
 ]
 """

 status = darksearch.crawling_status()

 """
 Number of pages indexed
 """

Testing

pytest

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

DarkSearch-1.3.4.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distributions

DarkSearch-1.3.4-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

DarkSearch-1.3.4-py2-none-any.whl (3.8 kB view hashes)

Uploaded Python 2

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