File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import re
2
2
import requests
3
+
3
4
url = input ("Enter Url: " )
4
5
text = requests .get (url ).text
5
- x = re .findall (r"[a-zA-Z]+@{1}[a-zA-Z]+[.]{1}[a-zA-Z]+" , text ) #This is a regex query which search for the particular email format.
6
+
7
+ x = re .findall (r"[a-zA-Z]+@{1}[a-zA-Z]+[.]{1}[a-zA-Z]+" , text ) #Regex query which search for the particular email format.
8
+
9
+ val = ""
6
10
for i in x :
7
11
val += i + "\n " #this adds all the email data found in val variable
8
- filename = input ("Enter the file Name you want: " ) #You can use any file name you want for your output file
12
+
13
+ filename = input ("Enter the file Name you want (without extension):" )
9
14
with open (f"{ filename } .txt" ,"w" ) as file :
10
15
file .write (val )
11
16
print ("Your File has been Saved" )
You can’t perform that action at this time.
0 commit comments