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):
|
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:
|
||||||
if emision == "can't find show":
|
if emision == "can't find show":
|
||||||
Label(self.resultframe.interior,text="impssible de parser cette chaine").pack()
|
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:
|
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:
|
except KeyError:
|
||||||
Label(self.resultframe.interior,text="réalisateur: "+emision['casting'][0]).pack()
|
print("numero de chaine inconnue")
|
||||||
Label(self.resultframe.interior,text="acteur: "+str(emision['casting'][1:])).pack()
|
unknow=Label(self.resultframe.interior, text="numero de chaine inconnue")
|
||||||
Label(self.resultframe.interior,text="synopsys: " +emision['synopsis'],wraplength=350).pack()
|
unknow.pack()
|
||||||
else:
|
|
||||||
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()
|
|
||||||
self.value.set("")
|
self.value.set("")
|
||||||
|
|
||||||
def click_reset(self):
|
def click_reset(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user