We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d75e46 commit 4405d01Copy full SHA for 4405d01
extracting-emails-from-website/emails-from-website.py
@@ -10,9 +10,12 @@
10
for i in x:
11
val+=i+"\n" #this adds all the email data found in val variable
12
13
-filename= input("Enter the file Name you want (without extension):")
14
-with open(f"{filename}.txt","w") as file:
15
- file.write(val)
16
- print("Your File has been Saved")
17
- print("Email(s) found:\n")
18
- print(val)
+if val=="":
+ print("No emails found in the website")
+else:
+ filename= input("Enter the file Name you want (without extension):")
+ with open(f"{filename}.txt","w") as file:
+ file.write(val)
19
+ print("Your File has been Saved")
20
+ print("Email(s) found:\n")
21
+ print(val)
0 commit comments