diff --git a/Python/get-email-fromURL/main.py b/Python/get-email-fromURL/main.py new file mode 100644 index 0000000..7ac5b52 --- /dev/null +++ b/Python/get-email-fromURL/main.py @@ -0,0 +1,48 @@ +from tkinter import * +import requests +from bs4 import BeautifulSoup +import html5lib +import re +from copy import copy + + +window = Tk() +window.geometry('300x550') +window.title('Emails from the Link') +entry1 = StringVar() +def fetch(): + try: + url = entry1.get() + r = requests.get(url) + content = r.text + soup = BeautifulSoup(content, 'html5lib') + mail_text = (soup.get_text()) + eml_reg_exp = re.findall(r"[a-zA-Z0-9]+@+[a-zA-Z]+\.[a-zA-Z]+" , mail_text) + ins = "" + for value in eml_reg_exp: + ins += value+'\n' + ins2 = copy(ins) + text.config(state= "normal") + text.insert(INSERT,ins2) + + except Exception: + print("No Email Found") + + return fetch + + + + +Label(window,text= "Give me a Link:").grid(row= 0, column =1) + +Label(window, text= "URL: ").grid(row=2 , column =0) +Entry(window,textvariable = entry1).grid(row=2, column =1) + +btn = Button(window,text= "Get Email", command = fetch) +btn.grid(row =3, column =1,pady = 12) + +text =Text(window,width = 29, height = 13) +text.grid(row= 5 , column= 1, pady= 3, padx= 2) + + +window.mainloop() \ No newline at end of file diff --git a/Python/get-email-fromURL/requirments.txt b/Python/get-email-fromURL/requirments.txt new file mode 100644 index 0000000..e784a3a --- /dev/null +++ b/Python/get-email-fromURL/requirments.txt @@ -0,0 +1,28 @@ +altgraph==0.17 +auto-py-to-exe==2.9.0 +BeautifulSoup4 +bottle==0.12.19 +bottle-websocket==0.2.9 +certifi==2021.5.30 +cffi==1.14.5 +chardet==4.0.0 +Eel==0.12.4 +future==0.18.2 +gevent==21.1.2 +gevent-websocket==0.10.1 +greenlet==1.1.0 +html5lib==1.1 +idna==2.10 +pefile==2021.5.24 +pycparser==2.20 +pyinstaller==4.3 +pyinstaller-hooks-contrib==2021.1 +pywin32-ctypes==0.2.0 +requests==2.25.1 +six==1.16.0 +soupsieve==2.2.1 +urllib3==1.26.5 +webencodings==0.5.1 +whichcraft==0.6.1 +zope.event==4.5.0 +zope.interface==5.4.0 \ No newline at end of file diff --git a/Python/get-lyrics/main.py b/Python/get-lyrics/main.py index 0a3d734..20d4f66 100644 --- a/Python/get-lyrics/main.py +++ b/Python/get-lyrics/main.py @@ -17,5 +17,5 @@ def getLyrics(title): lyrics += i.text+'\n' return lyrics -lyrics = getLyrics("Treat you better") +lyrics = getLyrics("Treat you better \n Thank You") print(lyrics) \ No newline at end of file