correct parser chaine

This commit is contained in:
vincent 2018-08-23 23:18:17 +02:00
parent 4f17444750
commit 62664cfca0

View File

@ -160,7 +160,7 @@ class Interface:
def click_update(self): def click_update(self):
self.data.parsechaine() self.data.parsechaine()
labelupdate = Label(self.resultframe, text="update chaine done"+"\r") labelupdate = Label(self.resultframe.interior, text="update chaine done"+"\r")
labelupdate.pack() labelupdate.pack()
def _openlink(self,link): def _openlink(self,link):
@ -198,10 +198,10 @@ class JSONfile:
if RepresentsInt(firstTD.find_next().string): if RepresentsInt(firstTD.find_next().string):
#print(firstTD.find_next().find_next().text) #print(firstTD.find_next().find_next().text)
liste_chaine[int(num)] = firstTD.find_next().find_next().text liste_chaine[str(int(num))] = firstTD.find_next().find_next().text
else: else:
#print(firstTD.find_next().string) #print(firstTD.find_next().string)
liste_chaine[int(num)] = firstTD.find_next().text liste_chaine[str(int(num))] = firstTD.find_next().text
print(json.dumps(liste_chaine, indent=4)) print(json.dumps(liste_chaine, indent=4))
self.data=liste_chaine self.data=liste_chaine
with open(self.datafilepath, 'w', encoding='utf-8') as f: with open(self.datafilepath, 'w', encoding='utf-8') as f: