Question
Full Python code: How to write a python code to web scrape html webpage Requirements: 1. Navigate to the URL with the .html extension: this
Full Python code: How to write a python code to web scrape html webpage
Requirements:
1. Navigate to the URL with the .html extension: this url say: https://example.in/osrp-vrsd/models.html. When the inner hyper link mentioned below (2022 Models) when click will have an url like https:// example.in /osrp-vrsd/2022-models.html
2. The page contains several hyperlinks in the format - 2022 Models, 2021 Models 2010 Models, etc, the code needs to access these hyperlinks and navigate into them one by one.
3. When one of the links mentioned above is obtained within the loop, there are many hyperlinks (which are dates, eg. March 23, 2022, December 17, 2022 etc), from these select only a set of links that come under a specific name (Ex. Recruiting Order) is to be extracted.
4. Once the links mentioned above are collected, we need to go into each of these links one by one (loop) and select another hyperlink (CEOS PRESS RELEASE) inside them.
5. From the hyperlinks mentioned above (CEOS PRESS RELEASE), check if they contain pdf files or not and collect all the dates (Example: December 17, 2022, March 23, 2022etc) which were the hyperlinks on the first page.
6. Create an excel file that contains the details about which dates has pdf file and which dates does not have pdf files in it
7. Collect all the pdf files
Example: First from the main url go to the below hyperlink
2022 Models (year hyperlinks), then navigate to
December 17, 2022 (dates hyperlinks) then navigate to
CEOS PRESS RELEASE (hyperlinks), then navigate to
Check if the above link has a PDF file or not, then
create an Excel file containing the dates corresponding result saying that particular date has pdf files in it or not. Then
Store the PDF files that are available.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started