test if an attribute is present in a tag in beautifulsoup,tags = soup.find_all(lambda tag: tag.has_attr('src'))