diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2025-03-02 00:37:28 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2025-03-02 00:37:28 +0000 |
commit | 3bdf73ccad90781af5ca75c8f7b311a95f073cb1 (patch) | |
tree | 4d7a4d5e5d76d6b4dc85fd928d7fd0a962a8eecf /parsers/logbooks.py | |
parent | 7fb42c926feb405846104f4375f795bcecb71f14 (diff) | |
download | troggle-3bdf73ccad90781af5ca75c8f7b311a95f073cb1.tar.gz troggle-3bdf73ccad90781af5ca75c8f7b311a95f073cb1.tar.bz2 troggle-3bdf73ccad90781af5ca75c8f7b311a95f073cb1.zip |
improving cave identification in logbooks
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r-- | parsers/logbooks.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py index ae6c75f..be9fccc 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -453,9 +453,13 @@ def parser_html(year, expedition, txt, seq=""): tid = reset_trip_id(ldate) triptitles = triptitle.split(" - ") if len(triptitles) >= 2: - place = triptitles[0] + place = triptitles[0].split()[0] else: - place = "Unknown" + p = triptitle.split() + if len(p) >= 2: + place = p[0] + else: + place = triptitle # tripcontent = re.sub(r"</p>", "", triptext) # tripcontent = re.sub(r"<p>", "<br /><br />", tripcontent).strip() tripcontent = triptext.strip() |