wention/BeautifulSoup4 ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python library for parsing HTML and XML that makes it really easy to pull data out of messy pages. I want to be able to load a document, look up tags and attributes, search for elements by name or id, loop through links, and grab all the visible text without a lot of fuss.

It should work with whatever parser is available, be comfortable to use from both Python 2 and Python 3, and include the kind of simple helper methods people expect for navigating and changing the document tree. Please also add a small set of examples and docs that show common things like finding all links, getting text, and pretty printing the parsed result.

If you need to check current docs or compatibility details online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab