add multi chaine to gui
This commit is contained in:
parent
941bbf9d2f
commit
fe0d5a4954
52
chaineTV.py
52
chaineTV.py
@ -102,35 +102,37 @@ class Interface:
|
||||
|
||||
def click(self):
|
||||
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:
|
||||
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)
|
||||
emision=parse_emmission(strlink)
|
||||
|
||||
if emision:
|
||||
if emision == "can't find show":
|
||||
Label(self.resultframe.interior,text="impssible de parser cette chaine").pack()
|
||||
if emision:
|
||||
if emision == "can't find show":
|
||||
Label(self.resultframe.interior,text="impssible de parser cette chaine").pack()
|
||||
else:
|
||||
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:
|
||||
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:
|
||||
Label(self.resultframe.interior,text="pas de connection internet impossible de determiner l'émission du soir").pack()
|
||||
|
||||
Label(self.resultframe.interior,text="pas de connection internet impossible de determiner l'émission du soir").pack()
|
||||
|
||||
|
||||
except KeyError:
|
||||
print("numero de chaine inconnue")
|
||||
unknow=Label(self.resultframe.interior, text="numero de chaine inconnue")
|
||||
unknow.pack()
|
||||
|
||||
except KeyError:
|
||||
print("numero de chaine inconnue")
|
||||
unknow=Label(self.resultframe.interior, text="numero de chaine inconnue")
|
||||
unknow.pack()
|
||||
self.value.set("")
|
||||
|
||||
def click_reset(self):
|
||||
|
Loading…
Reference in New Issue
Block a user