Skip to main content

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.

0.0.3

  • Fixed parsing of HTML5 document.

Metadata

Release files for lxmlmechanize 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lxmlmechanize 0.0.3
File Size Uploaded Provenance Actions
lxmlmechanize-0.0.3.tar.gz 13.7 kB Without provenance Details for lxmlmechanize-0.0.3.tar.gz

Release files / lxmlmechanize-0.0.3.tar.gz

Download URL lxmlmechanize-0.0.3.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
89c3a7c69e66bf7e8f9bb11e1c7d9be8dc6aeb0fe286f91b2d830ac652eeb3b6
BLAKE2b-256 checksum
How to use checksums
5a9689d4be6a6a121db32076890e74cc3407f419947ead0e39dae64e80e378a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for lxmlmechanize 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page