Skip to main content

A simple html parser that constructs DOM tree.

Project description

It is aimed to provide jquery like API.

Example

from pyHTMLParser.Query import Q_open, Q_close, Q

Q_open('http://www.example.com')

second_target_link = Q('a[href$="-target.html"]:nth-child(2)')
print(second_target_link.attr('href'))

>>> http://www.some-target.com/example.html

Q_close()

Documentation

API Docs .

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

pyHTMLParser-2.1.0.tar.gz (11.9 kB view hashes)

Uploaded Source

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