Question: Write a function to dump the html content, and save it in the same directory of your python script. The name of the saved html

Write a function to dump the html content, and save it in the same directory of your python script. The name of the saved html file should include the current time stamp.

I currently have been trying this code. But Repl.it says "ModuleNotFoundError: No module named 'urllib2'". Could someone point out what i am doing wrong and help me include the current time stamp using 'datetime'. The format for the date and time should be YYYY_MM_DD_HH_MM_SS.

import urllib2

def webpagedumb(url):

req = urllib2.Request('https://en.wikipedia.org/wiki/Web_page')

response = urllib2.urlopen(req)

the_page = response.read()

return

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Lets address the issues in your current code and achieve the desired task Issue Explanation ModuleNo... View full answer

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!