Question: Web Scraping in Python Next, we collect the body of the table. (2 points) Check what the class name of the target table and find

Web Scraping in Python

Next, we collect the body of the table.

(2 points) Check what the class name of the target table and find all the

elements of that class. Then, print out the number of such
elements. You must confirm that there is only one such table.

(2 points) Use the find function (rather than find_all) to find the table and save it as table.

(2 points) Find all the

elements in table. Name it as body.

(2 points) The first

element in body is the header row. Therefore, save the remainder of body as body_rows.

(5 points) Create an empty list all_rows. This is where we store the table body data. Write a for loop that collects all the table entries based on body_rows. (Hint: See Page 27 (page number on the bottom right corner) of the lecture slide)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!