How can I pass the input I receive with Tkinter to the getLink function? I want it to send the input to the function when I press the button.
import tkinter as tk
import requests
pencere=tk.Tk()
pencere.title("İnstagram Share App")
pencere.geometry("360x480")
def getLink(url):
r = requests.get(url)
with open('00.jpeg', 'wb') as f:
f.write(r.content)
def buton_link():
link = ent1.get()
return link
e1=tk.Label(text="Image Link",font="Arial 12 bold")
e1.pack()
ent1=tk.Entry(width=30)
ent1.pack()
b1=tk.Button(text="Link",bg="black",fg="white",font="Arial 20 bold",command=buton_link())
b1.pack()
pencere.mainloop()
link = buton_link()
getLink(link)