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 hashes)
Built Distributions
Close
Hashes for DarkSearch-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9005877a09d366be85814f6ef35594253a2321e3d88945d06228b6fe7ae31066 |
|
MD5 | b8d8fcdbefb9d5e4c2c15cacb1afda0b |
|
BLAKE2b-256 | fc21d9e4fb66150746f4a8a2237a7bd216b6c4a21d0a3caadb21976e09238d5a |
Close
Hashes for DarkSearch-1.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6bde7eb6bcad542922b898e2f2dd1c203ff47ee5fd545ec0f61878778c01af7 |
|
MD5 | 27439e7c71b69d5c5f676c6c4c8cd3e1 |
|
BLAKE2b-256 | d3f5ddf9b8ab4cd75aeb7fc070580d97a52f5325c6182df8d478e853aeef9779 |