Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Have your python code ask the user for a URL to have the HTML data pulled from. This should be polite and needs to remind

Have your python code ask the user for a URL to have the HTML data pulled from. This should be polite and needs to remind the user the full URL is required (http://www.website.com for example). The code should check the HTTP Get request for a valid 200 response. Only if the response is 200, should the HTML be copied. The user should be made aware of the response code. If the response is favorable, copy the HTML code to a .txt file. Because the internet changes almost daily, your code also needs to append the date and time the HTML was accessed. This needs to be automated. The user should not have to add the date/time of the request.
If the HTTP Get response is anything but 200, the user should be asked if they want to enter a URL again. If they agree, then the code should repeat the steps above, if not, the code should thank them and terminate.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions