Metadata-Version: 2.1
Name: DarkSearch
Version: 1.3.4
Summary: Python API wrapper for darksearch.io
Home-page: https://github.com/thehappydinoa/DarkSearch
Author: thehappydinoa
Author-email: thehappydinoa@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: requests

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

Python API wrapper for `darksearch.io <https://darksearch.io/>`_

`API Documentation <https://darksearch.io/apidoc>`_

*******
Install
*******
.. code-block:: bash

  pip install darksearch

*****
Usage
*****
.. code-block:: python

  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
*******

.. code-block:: bash

  pytest


