Fix source output 'list out of range'

This commit is contained in:
yoshiko2
2021-05-29 00:50:47 +08:00
parent 2a7c2b5095
commit a3eb94ddcb
9 changed files with 25 additions and 9 deletions

View File

@@ -18,7 +18,9 @@ def main(number: str) -> json:
if not soup.select_one("#moviepages > div > div:nth-child(1) > div.movie-info.section"):
raise ValueError("page info not found")
except:
except Exception as e:
if config.Config().debug():
print(e)
dic = {"title": ""}
return json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'))
dic = {