Python API wrapper for darksearch.io
Project description
Python API wrapper for darksearch.io
Install
pip install darksearch
Usage
import darksearch
"""
`headers` and `proxies` are optional
proxies = {
"http": "http://127.0.0.1:8080"
}
headers = {
"User-Agent": "Chrome/57.0.2987.133"
}
"""
client = darksearch.Client(headers=None, proxies=None)
results = client.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 = client.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 = client.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 = client.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
}
]
},
...
]
"""
Testing
pytest
Project details
Release history Release notifications | RSS feed
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.4.0.tar.gz
(3.5 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file DarkSearch-1.4.0.tar.gz.
File metadata
- Download URL: DarkSearch-1.4.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58b25e6170318b7974076deb447ef00698cc130d52b9bb373b35947fe4bc7d69
|
|
| MD5 |
201c70d3be6b655da9a1a6e760fd274f
|
|
| BLAKE2b-256 |
ec3d1965f2cf49ecc9f8e49fc94f19cb70272627142884f8a12c52de92931e3b
|
File details
Details for the file DarkSearch-1.4.0-py3-none-any.whl.
File metadata
- Download URL: DarkSearch-1.4.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9005877a09d366be85814f6ef35594253a2321e3d88945d06228b6fe7ae31066
|
|
| MD5 |
b8d8fcdbefb9d5e4c2c15cacb1afda0b
|
|
| BLAKE2b-256 |
fc21d9e4fb66150746f4a8a2237a7bd216b6c4a21d0a3caadb21976e09238d5a
|
File details
Details for the file DarkSearch-1.4.0-py2-none-any.whl.
File metadata
- Download URL: DarkSearch-1.4.0-py2-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6bde7eb6bcad542922b898e2f2dd1c203ff47ee5fd545ec0f61878778c01af7
|
|
| MD5 |
27439e7c71b69d5c5f676c6c4c8cd3e1
|
|
| BLAKE2b-256 |
d3f5ddf9b8ab4cd75aeb7fc070580d97a52f5325c6182df8d478e853aeef9779
|