add multi chaine to gui

This commit is contained in:
vincent 2018-08-22 13:06:52 +02:00
parent 941bbf9d2f
commit fe0d5a4954

View File

@ -102,35 +102,37 @@ class Interface:
def click(self): def click(self):
print(self.value.get()) print(self.value.get())
Arrayvalue=self.value.get().split(" ")
for value in Arrayvalue:
try:
strlink=geturlprogrammetv(self.data[value])
link= Labbelink(self.resultframe.interior,self.data[value],strlink)
link.pack()
self.resultframe.update()
print(self.data[value])
try: emision=parse_emmission(strlink)
strlink=geturlprogrammetv(self.data[self.value.get()])
link= Labbelink(self.resultframe.interior,self.data[self.value.get()],strlink)
link.pack()
self.resultframe.update()
print(self.data[self.value.get()])
emision=parse_emmission(strlink) if emision:
if emision == "can't find show":
if emision: Label(self.resultframe.interior,text="impssible de parser cette chaine").pack()
if emision == "can't find show": else:
Label(self.resultframe.interior,text="impssible de parser cette chaine").pack() image=LabelImage(self.resultframe.interior,emision['img'])
image.pack()
Labbelink(self.resultframe.interior,("emmision ce soir: "+emision["title"]),emision['href']).pack()
if len(emision['casting']) > 0:
Label(self.resultframe.interior,text="réalisateur: "+emision['casting'][0]).pack()
Label(self.resultframe.interior,text="acteur: "+str(emision['casting'][1:])).pack()
Label(self.resultframe.interior,text="synopsys: " +emision['synopsis'],wraplength=350).pack()
else: else:
image=LabelImage(self.resultframe.interior,emision['img']) Label(self.resultframe.interior,text="pas de connection internet impossible de determiner l'émission du soir").pack()
image.pack()
Labbelink(self.resultframe.interior,("emmision ce soir: "+emision["title"]),emision['href']).pack()
if len(emision['casting']) > 0:
Label(self.resultframe.interior,text="réalisateur: "+emision['casting'][0]).pack()
Label(self.resultframe.interior,text="acteur: "+str(emision['casting'][1:])).pack()
Label(self.resultframe.interior,text="synopsys: " +emision['synopsis'],wraplength=350).pack()
else:
Label(self.resultframe.interior,text="pas de connection internet impossible de determiner l'émission du soir").pack()
except KeyError: except KeyError:
print("numero de chaine inconnue") print("numero de chaine inconnue")
unknow=Label(self.resultframe.interior, text="numero de chaine inconnue") unknow=Label(self.resultframe.interior, text="numero de chaine inconnue")
unknow.pack() unknow.pack()
self.value.set("") self.value.set("")
def click_reset(self): def click_reset(self):