Bystroushaak / pyDHTMLParser

Lightweight HTML/XML parser for quick and dirty web scraping.
MIT License
6 stars 3 forks source link

Add parent_iterator #13

Open Bystroushaak opened 9 years ago

Bystroushaak commented 9 years ago
def parent_iterator(el):
    while el.parent:
        yield el.parent
        el = el.parent