add emmission do UI probléme de synopsis trop large

This commit is contained in:
vincent 2018-08-18 20:43:41 +02:00
parent 755876ec64
commit c603cf0e8c

View File

@ -37,7 +37,7 @@ class Interface:
self.label.pack()
self.entree.pack()
self.entree.focus_set()
self.resultframe.pack()
self.resultframe.pack(expand=1,fill='both')
self.frame.pack()
self.bouton.pack(side=LEFT)
self.reset.pack(side=RIGHT)
@ -59,9 +59,26 @@ class Interface:
print(self.value.get())
try:
link= Labbelink(self.resultframe,self.data[self.value.get()],geturlprogrammetv(self.data[self.value.get()]))
strlink=geturlprogrammetv(self.data[self.value.get()])
link= Labbelink(self.resultframe,self.data[self.value.get()],strlink)
link.pack()
print(self.data[self.value.get()])
emision=parse_emmission(strlink)
if emision:
if emision == "can't find show":
Label(self.resultframe,text="impssible de parser cette chaine").pack()
else:
Label(self.resultframe,text="emmision ce soir: "+emision["title"]).pack()
if len(emision['casting']) > 0:
Label(self.resultframe,text="réalisateur: "+emision['casting'][0]).pack()
Label(self.resultframe,text="acteur: "+str(emision['casting'][1:])).pack()
Label(self.resultframe,text="synopsys: " +emision['synopsis']).pack(expand=1,fill="both",padx=120)
Label(self.resultframe,text="lien: "+emision['href']).pack()
self.resultframe.update()
else:
Label(self.resultframe,text="pas de connection internet impossible de determiner l'émission du soir").pack()
except KeyError:
print("numero de chaine inconnue")
unknow=Label(self.resultframe, text="numero de chaine inconnue")