Skip to main content

A pure-python headless browser

Project description

A simple library for interacting with the web from python


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:

  • You’ve already checked out the very talented Kenneth Reitz’s requests-html
  • You need to actively interact with some web-page from Python (e.g. submitting forms, downloading files)
  • You don’t control the site you need to interact with (if you do, just make an API).
  • You don’t need javascript support (you’ll need selenium or phantomjs).

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('')
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')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for activesoup, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size activesoup-0.0.5-py3-none-any.whl (6.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size activesoup-0.0.5.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page