Application Hacking Interface. An HTTP API client helper for "unofficial" APIs.
Project description
Application Hacking Interface
Using the simple HTTPClient
from logging import *
c = ahi.HTTPClient(cache_ttl=60, force_wait_interval=1, auto_adjust_for_rate_limiting=True, logging_level=DEBUG, proxy='http://127.0.0.1:8080', verify=True, allow_redirects=False, timeout=None)
resp = c.get('http://example.com/')
print(resp)
Using the Selenium driver for Firefox
from logging import *
from selenium.webdriver.common.keys import Keys
ff = ahi.SeleniumFirefox(headless=True, force_wait_interval=timedelta(seconds=0), logging_level=DEBUG)
ff.get('https://example.com/')
ff.html.css('#LoginForm_Password').send_keys('P4$$w0rd')
ff.html.css('#LoginForm_Password').send_keys(Keys.RETURN)
ff.execute_script('''SetLocation('\x2Fdocs\x2FProMyPlanning.aspx?_Division_=549942',event, 0)''')
ff.html.css('#Reports_Reports_Reports_MyPlanning').click()
print(ff.html)
Converting from a curl command line
girl --curl https://example.com/
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
ahi-0.19.23.tar.gz
(23.2 kB
view details)
Built Distribution
ahi-0.19.23-py3-none-any.whl
(26.0 kB
view details)
File details
Details for the file ahi-0.19.23.tar.gz
.
File metadata
- Download URL: ahi-0.19.23.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c4bef48a00f227ab85c05aef513688da7934bf3b2ec679beb36fa8bb9091302 |
|
MD5 | 5d4d8937747cb8748450c29ee67f976f |
|
BLAKE2b-256 | f5149585fd221b158c53b581555758b38ac398491f0319e03e788a7842c3f613 |
File details
Details for the file ahi-0.19.23-py3-none-any.whl
.
File metadata
- Download URL: ahi-0.19.23-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99595ba7156987f4d85eac26d72f7de07244c516b2bde8de30b5a8c227f33402 |
|
MD5 | 6d5655869bf52abfda26983594f10b71 |
|
BLAKE2b-256 | 789aec1e56bfeca5fc55dbb653a5e260cc7859935c0bf7d8b374a87370d422de |