The soup.find_all command above takes in two arguments. image_tags = soup.find_all( 'img', class_= 't0fcAb') This is an optional command that helps you to view the HTML content in a form that is human readable. The first argument ‘ ntent ’, passes the HTML content in the variable page to the soup object, and the second argument ‘ html.parser ’ simply specifies what is going to be the role of the soup object. Here we instantiate the soup object which is of the type BeautifulSoup. soup = BeautifulSoup(ntent, 'html.parser') This step imports the BeautifulSoup module to our working directory. Image_tags = soup.find_all( 'img', class_= 't0fcAb') Soup = BeautifulSoup(ntent, 'html.parser') This module will help you to actually extract the required content from the html content that you just created. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |