Answers for "beautifulsoup get img alt"

0

beautifulsoup get img alt

# html_doc can read from file or url 
soup = BeautifulSoup(html_doc, features='lxml')
print("\n".join([img['alt'] for img in soup.find_all('img', alt=True)]))
Posted by: Guest on April-04-2020

Python Answers by Framework

Browse Popular Code Answers by Language