2020-04-23, 02:49
[sintaxe = python] try:
link = common.OpenURL (url) .replace ('\ n', '')
m = re.compile ("globalUri = '([^ \'] +) '")). findall(link)
m2 = re.compile ("globalUri2 = '([^ \'] +) '")). findall(link)
para url2 em [m, m2]:
AddDir (nome, url2, 10, iconimage, iconimage, isFolder = False, IsPlayable = True, info = "", fundo = url)
except IndexError:
pass
[/ sintaxe]
error log:
m2 = re.compile ( "globalUri2 = '([^ \' ] +) '"). findall (link)
IndexError: list index out of range
It turns out that the "m2" sometimes does not exist in the imported url but the "m" always exists, so I would like to ignore only the "m2" when it is not found, Help
link = common.OpenURL (url) .replace ('\ n', '')
m = re.compile ("globalUri = '([^ \'] +) '")). findall(link)
m2 = re.compile ("globalUri2 = '([^ \'] +) '")). findall(link)
para url2 em [m, m2]:
AddDir (nome, url2, 10, iconimage, iconimage, isFolder = False, IsPlayable = True, info = "", fundo = url)
except IndexError:
pass
[/ sintaxe]
error log:
m2 = re.compile ( "globalUri2 = '([^ \' ] +) '"). findall (link)
IndexError: list index out of range
It turns out that the "m2" sometimes does not exist in the imported url but the "m" always exists, so I would like to ignore only the "m2" when it is not found, Help