A pure-python headless browser
Project description
A simple library for interacting with the web from python
Description
activesoup combines familiar python web capabilities for convenient headless “browsing” functionality:
Modern HTTP support with requests - connection pooling, sessions, …
Convenient access to the web page with an interface inspired by beautifulsoup - convenient HTML navigation.
Robust HTML parsing with html5lib - parse the web like browsers do.
Use cases
Consider using activesoup when:
Usage examples
Log into a website, and download a CSV file that’s access-protected:
from activesoup import driver
d = driver.Driver()
login_page = d.get('https://my-site.com/login')
login_form = login_page.form
member_portal = login_form.submit({'username': secret_store['username'],
'password': secret_store['password']})
if member_portal.response.status_code not in range(200, 300):
raise RuntimeError("Couldn't log in")
# Logged in now
csv_report = d.get('/members_area/file.csv')
csv_report.save_to('~/interesting_resport.csv')
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
activesoup-0.0.3.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for activesoup-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0db59012f633394107556e870054265d20d104a9d2d724fe22d3c883b9b353ca |
|
MD5 | 562f7ee5c5e3d2f9b9ba3927f4ecb57e |
|
BLAKE2b-256 | d21d66aa7380c3aeba00099c17c6a23514e3afd4cc521374da1db78a7e194c5f |