Is it possible to sort tags by the order they would be in the document tree?
This appears to work to a certain extent in some circumstances with the Python 2.x version but fails with the following error under Python 3.x
TypeError: unorderable types: Tag() < Tag()
The use case is being able to do multiple different types of soup.find_all() calls, append the results together and to then be able to sort the results such that the list is in document order.
Does a tag have some kind of index attribute which could be used as a sort key?
Kind regards,
Martin