Skip to main content

UNKNOWN

Project description

Introduction

lxmlmechanize is an efficient, i18n-aware, simple, lxml-based HTTP user-agent.

Synopsis

from lxmlmechanize import default_keychain, Mechanize
from lxmlmechanize.urllib2ext import Credentials

m = Mechanize()

# set credentials for authentication
default_keychain.add(Credentials('http://localhost:12345/', realm=None, user='test', password='testtest'))

# navigate to the page
m.navigate('http://localhost:12345/')

# populate the form fields
form = m.page.root.xpath('body//form[@id="test"]')[0]
form.xpath('input[@name="user"]')[0].set('value', 'user')
form.xpath('input[@name="password"]')[0].set('value', 'password')

# submit the form
m.submit_form(form)

Contributors

Changelog

0.0.0

  • Initial

0.0.1

  • Store the headers and HTTP status of the last request to Mechanize object as headers and status respectively.

0.0.2

  • Make the loader factory customizable

Download files

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

Source Distribution

lxmlmechanize-0.0.2.tar.gz (13.5 kB view details)

Uploaded Source

File details

Details for the file lxmlmechanize-0.0.2.tar.gz.

File metadata

File hashes

Hashes for lxmlmechanize-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9c0ab2d5c905d7f73df59a96c61e7ef9730276c1bbe4518ce5c5ffa80b9cec12
MD5 b224bcbf08ac337e605c8fc0131e1791
BLAKE2b-256 6e1e5baa6c3aeb4cc85453e1b9c4adb305829cd1550113f9f88e20174b6388b8

See more details on using hashes here.

Supported by

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