some litle fix

This commit is contained in:
vincent 2018-08-18 19:57:43 +02:00
parent 86ccdbee75
commit 755876ec64

View File

@ -1,4 +1,4 @@
from tkinter import *
from tkinter import Label,Button,Frame,Tk,Entry,StringVar,LEFT,RIGHT
import json
import sys
import os
@ -6,7 +6,7 @@ import unicodedata
from bs4 import BeautifulSoup
import webbrowser
import urllib.request
import re
class Labbelink (Label):
@ -15,8 +15,8 @@ class Labbelink (Label):
self.link=link
self.bind("<Button-1>",self._openlink)
def _openlink(self,event):
webbrowser.open(self.link)
def _openlink(self,evt):
webbrowser.open(self.link)
class Interface:
@ -57,7 +57,6 @@ class Interface:
def click(self):
print(self.value.get())
labellink = Label(self.resultframe, text="")
try:
link= Labbelink(self.resultframe,self.data[self.value.get()],geturlprogrammetv(self.data[self.value.get()]))
@ -127,8 +126,8 @@ def parsechaine(file):
if RepresentsInt(num):
if RepresentsInt(firstTD.find_next().string):
#print(firstTD.find_next().find_next().text)
liste_chaine[int(num)] = firstTD.find_next().find_next().text
#print(firstTD.find_next().find_next().text)
liste_chaine[int(num)] = firstTD.find_next().find_next().text
else:
#print(firstTD.find_next().string)
liste_chaine[int(num)] = firstTD.find_next().text
@ -176,7 +175,7 @@ def cli(num):
data = load_jsonfile(datafilepath)
print(num)
try:
print(data[num])
print(data[num])
except KeyError:
print("numero de chaine inconnue")
return
@ -202,6 +201,5 @@ if len(sys.argv) > 1:
else:
cli(i)
else:
interface = Interface()
interface.value.set("")
interface.mainloop()
Interface().mainloop()