add emmission do UI probléme de synopsis trop large
This commit is contained in:
parent
755876ec64
commit
c603cf0e8c
21
chaineTV.py
21
chaineTV.py
@ -37,7 +37,7 @@ class Interface:
|
|||||||
self.label.pack()
|
self.label.pack()
|
||||||
self.entree.pack()
|
self.entree.pack()
|
||||||
self.entree.focus_set()
|
self.entree.focus_set()
|
||||||
self.resultframe.pack()
|
self.resultframe.pack(expand=1,fill='both')
|
||||||
self.frame.pack()
|
self.frame.pack()
|
||||||
self.bouton.pack(side=LEFT)
|
self.bouton.pack(side=LEFT)
|
||||||
self.reset.pack(side=RIGHT)
|
self.reset.pack(side=RIGHT)
|
||||||
@ -59,9 +59,26 @@ class Interface:
|
|||||||
print(self.value.get())
|
print(self.value.get())
|
||||||
|
|
||||||
try:
|
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()
|
link.pack()
|
||||||
print(self.data[self.value.get()])
|
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:
|
except KeyError:
|
||||||
print("numero de chaine inconnue")
|
print("numero de chaine inconnue")
|
||||||
unknow=Label(self.resultframe, text="numero de chaine inconnue")
|
unknow=Label(self.resultframe, text="numero de chaine inconnue")
|
||||||
|
Loading…
Reference in New Issue
Block a user