pyHTMLParser
HTML parser
Usage
from pyHTMLParser.Query import Q_open, Q_close, Q
Q_open('example.com')
second_target_link = Q('a[href$="-target.html"]:nth-child(2)')
print(second_target_link.attr('href'))
>>> some-target.html
Q_close()
A simple html parser that constructs DOM tree.
Homepage Repository PyPI Python