'Python Request with Tkinker Variable

How can I do a response = requests.get() with variable from tkinter, like this so that I can send some bumbersto an api like 20 21 22 and the request looks like "https://google.com/202122"

def d():
  response = requests.get("myserverip/send.php?host=e2<eq>#%s#&port=e2<eq>#%s#&time=e3<eq>#%s#&method=udp") % (e1, e2, e3)
  print(response)

#call
def d1():
   threading.Thread(target=d).start()

def window():
  window = Tk()
  window.title("tools")
  window.geometry("530x240")
  Label(window, text="1").grid(row=0)
  Label(window, text="2").grid(row=1)
  Label(window, text="3").grid(row=2)
  
  e1 = Entry(window)
  e2 = Entry(window)
  e3 = Entry(window)
  
  e1.grid(row=0, column=1)
  e2.grid(row=1, column=1)
  e3.grid(row=2, column=1)

  Button(window, text='DOREQUEST', bg="gray", fg="white", command=d1).grid(row=3, column=1, sticky=E, pady=30)
       
  frame_label.place(x=210, y=0)                      

  window.mainloop()

#THREADING
p = Process(target=window)
p.start()
p.join()


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source