Question: How to write a python code to web scrape html webpage Requirements: 1. Navigate to the URL with the .html extension 2. The page contains

How to write a python code to web scrape html webpage

Requirements:

1. Navigate to the URL with the .html extension

2. The page contains several hyperlinks in the format - 2022 Models, 2021 Models 2010 Models, the code needs to access these hyperlinks and navigate into them one by one.

3. When one of the links mentioned above is clicked, there are many hyperlinks (dates, eg. 23 March 2022), from these select only a set of links that come under a specific name (Ex. Recruiting) is to be extracted.

4. Once the links mentioned above are collected, we need to go into each of these links one by one and select another hyperlink (CEOs press release) inside them.

5. From the hyperlinks mentioned above, collect all the dates (Example: 23 March 2022, etc) which was the hyperlink on the first page, that have a pdf file in it and also those that do not have the pdf file.

Example: 2022 Models (hyperlink), click and navigate to

Dates (hyperlink) click and navigate to

CEOs press release (hyperlink), click and navigate to

Check if the above link has a PDF file.

Store the PDF file as well as the dates that have PDFs and the ones that dont.

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!