From cd7666c4ec330cb2998a75fb4fa2ec79c9e4e224 Mon Sep 17 00:00:00 2001 From: Amit <52880868+AvTe@users.noreply.github.com> Date: Sun, 23 Oct 2022 13:06:08 +0530 Subject: [PATCH] Web Page Download with Python Kindly merge my pull request --- Webpagedownload.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Webpagedownload.py diff --git a/Webpagedownload.py b/Webpagedownload.py new file mode 100644 index 0000000..0519ec2 --- /dev/null +++ b/Webpagedownload.py @@ -0,0 +1,14 @@ +import urllib.request + +try: + file = urllib.request.urlopen("https://www.techexploits.com/") + content = file.read() + +except urllib.error.HTTPError: + print('The web page does not exist') + exit() + +f = open('myfile.html', 'wb') +f.write(content) +f.close() +