Trying to get gui menu to populate the "url =()" varible

  python-3.x, tkinter, variables

Hi eveyone hope you’re well, I’m pretty new to python, but I’m trying to get an app made where the user inputs the URL and that URL will go into my code.
Is this the right route to do so

    #GUI
window =Tk()
window.title=("scraper")
window.geometry('400x200')
def button_command():
    text = entry1.get()
    print(text)
    return None

entry1 = Entry(window, width = 20)
entry1.pack()
Button (window, text="input", command=button_command).pack()

window.mainloop()

  
# url
url = 

Source: Python-3x Questions

LEAVE A COMMENT