GetLink.py 392 B

12345678910
  1. from Core.Debug import LogWarning, LogInfo
  2. def script(card,arg,res):
  3. name:str = card['version-id']
  4. data = res.data[f'{arg[1]}Link']
  5. if '${' in name:
  6. raise KeyError()
  7. if arg[1] == 'Mcbbs' and name not in data:
  8. LogInfo(f'尝试获取MCBBS链接 {name},但未找到,由于 MCBBS 关站,返回空值以抑制 Warning')
  9. return ''
  10. return data[name]