mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-07-27 09:00:41 +08:00
fix(parser): handle None return from raw_parser to avoid AttributeError (#992)
When raw_parser fails to parse non-episodic resources (movies, collections), it returns None. Add guard clause in title_parser to skip these gracefully instead of crashing on attribute access. Downgrade log level from error to info since this is expected behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,8 @@ class TitleParser:
|
||||
episode = Episode(**episode_dict)
|
||||
else:
|
||||
episode = raw_parser(raw)
|
||||
if episode is None:
|
||||
return None
|
||||
|
||||
titles = {
|
||||
"zh": episode.title_zh,
|
||||
|
||||
Reference in New Issue
Block a user