Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

beautifulsoup get img alt

# html_doc can read from file or url 
soup = BeautifulSoup(html_doc, features='lxml')
print("
".join([img['alt'] for img in soup.find_all('img', alt=True)]))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #beautifulsoup #img #alt
ADD COMMENT
Topic
Name
8+8 =