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.31.tar.gz
(32.2 kB
view details)
Built Distribution
ahi-0.19.31-py3-none-any.whl
(40.7 kB
view details)
File details
Details for the file ahi-0.19.31.tar.gz
.
File metadata
- Download URL: ahi-0.19.31.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e89e768ec7a0a4c0b66006a460c4f839f1cc559ce4b344d6481e88ed13c726f9 |
|
MD5 | 60ea17df0d240b031a72f44fe8a3fefb |
|
BLAKE2b-256 | 5fde5221376a0c356a2da41e1f21014f3decd56dc65036ab9bf96fb5d56f9bd1 |
File details
Details for the file ahi-0.19.31-py3-none-any.whl
.
File metadata
- Download URL: ahi-0.19.31-py3-none-any.whl
- Upload date:
- Size: 40.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc5d09ad921518a55314b7ae3c18ed38b2b78dbf317a2a64096ae9afc79f4b50 |
|
MD5 | 8e2b4f7df27aa5475c5e7188d55c1b9b |
|
BLAKE2b-256 | 8bf4898ec22d236c740b726a75147994859e7cd560b865fdb37a334c48a4d3ee |