diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-10-08 17:33:51 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-10-08 17:33:51 -0700 |
commit | d47e0725e66b7b6c7ac9466bbe4d4a21b0ab3ca0 (patch) | |
tree | 3370c6b8d9d91a2607133722b82a3136c28a3d7c | |
parent | 31370aea71a0fb42fc70821185f5e1ba312843d6 (diff) | |
download | chocula-d47e0725e66b7b6c7ac9466bbe4d4a21b0ab3ca0.tar.gz chocula-d47e0725e66b7b6c7ac9466bbe4d4a21b0ab3ca0.zip |
vanished_inactive: more tolerant handling of unicode BOM
-rw-r--r-- | chocula/directories/vanished_inactive.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chocula/directories/vanished_inactive.py b/chocula/directories/vanished_inactive.py index 8b23525..61d6077 100644 --- a/chocula/directories/vanished_inactive.py +++ b/chocula/directories/vanished_inactive.py @@ -27,7 +27,8 @@ class VanishedInactiveLoader(DirectoryLoader): def parse_record(self, record) -> Optional[DirectoryInfo]: # HACK - record["Title"] = record["\ufeffTitle"] + if "\ufeffTitle" in record: + record["Title"] = record["\ufeffTitle"] if not record["Title"]: return None |