Skip to main content

A pure-python headless browser

Project description

https://travis-ci.org/jelford/activesoup.svg?branch=master https://img.shields.io/pypi/v/activesoup.svg?maxAge=2592000

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:

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


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.5.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

activesoup-0.0.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file activesoup-0.0.5.tar.gz.

File metadata

  • Download URL: activesoup-0.0.5.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for activesoup-0.0.5.tar.gz
Algorithm Hash digest
SHA256 467fb545044e9093a65443555d92055bd070ceeab81ee755f9cb6c7d09d01fbc
MD5 907d6324be8309bd1282b6d46d34954d
BLAKE2b-256 cfbd5428bde7cf630ed4e33e2e748f751ed43a7dd76c2849617de9c17bf73555

See more details on using hashes here.

File details

Details for the file activesoup-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: activesoup-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3

File hashes

Hashes for activesoup-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4c18ac05ee68046886ad35493be92d7884785c7df282df92bfad44b86043731d
MD5 51112fc74885ec8912fa7187e8c31c69
BLAKE2b-256 e630deaac6c0464c523756820114ca2dfbd2ae320b787caa4d496744785edbb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page