Fix parsing info

This commit is contained in:
taizan-hokouto
2020-11-03 15:44:44 +09:00
parent a37602e666
commit 5eb8bdbd0e
3 changed files with 29 additions and 9 deletions

View File

@@ -94,10 +94,13 @@ class Runner:
path = util.checkpath(separated_path + video_id + '.html')
try:
info = VideoInfo(video_id)
except Exception as e:
except (PatternUnmatchError, JSONDecodeError) as e:
print("Cannot parse video information.:{} {}".format(video_id, type(e)))
if Arguments().save_error_data:
util.save(str(e), "ERR", ".dat")
util.save(str(e.doc), "ERR", ".dat")
continue
except Exception as e:
print("Cannot parse video information.:{} {}".format(video_id, type(e)))
continue
print(f"\n"