Oct-01-2020, 07:55 PM
If you want the tag name:
print(itm.tag_name)
get_attribute
from docs - Quote:Gets the given attribute or property of the element.meaning that if you do something like:
print(itm.get_attribute('class'))the output would be:
Output:nice-name