I would like to get all the tags in a document and then process each one based on the presence (or absence) of certain attributes.
E.g.,
you can check if some attribute are present
scriptTags = outputDoc.findAll('script', some_attribute=True) for script in scriptTags: do_something()