]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Don't add gastronomy only consisting of "...".
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:42:55 +0000 (15:42 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:42:55 +0000 (15:42 +0200)
bots/sledrun_wikitext_to_json.py

index 3bc293e9f4c965ea1475fd2fbd181b62ed5cdca1..9c8909487e086bca9a82eb07700a5ecf4f80f3ce 100644 (file)
@@ -373,9 +373,10 @@ class SledrunWikiTextToJsonBot(
                                     g['name'] = name
                                 if len(note) > 0:
                                     g['note'] = note
-                            elif len(remaining) > 0:
+                            elif len(remaining) > 0 and remaining != '...':
                                 g['name'] = remaining
-                            gastronomy.append(g)
+                            if len(gastronomy) != 0:
+                                gastronomy.append(g)
                         else:
                             break
                 return gastronomy