From 6cd3f9afcbd363835163e8692fea33ae6e991a8e Mon Sep 17 00:00:00 2001 From: Mike Richards Date: Thu, 14 Dec 2023 22:20:24 -0500 Subject: [PATCH] Fix Amuse Labs --- scripts/import/amuselabs.fnl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/import/amuselabs.fnl b/scripts/import/amuselabs.fnl index 0602a95e..4e61e21e 100644 --- a/scripts/import/amuselabs.fnl +++ b/scripts/import/amuselabs.fnl @@ -100,7 +100,8 @@ (fn import.amuselabsJSON [p data] (let [json (yajl.to_value data) ipuz (amuse->ipuz json)] - (when (= json.set "tny-new-cryptic") + (when (and (json.title:match "[Cc]ryptic") + (json.endMessage:match "newyorker")) (add-checker-highlight! ipuz)) (p:LoadIpuzString (yajl.to_string ipuz)))) @@ -109,7 +110,9 @@ (fn import.amuselabsHtml [p html] (match (html:match "rawc%s*=%s*'([^']+)'") - rawc (import.amuselabsBase64 p rawc))) + rawc (import.amuselabsBase64 p rawc) + _ (match (html:match "\"rawc\"%s*:%s*\"([^\"]+)\"") + rawc (import.amuselabsBase64 p rawc)))) (import.addHandler import.amuselabsJSON :json "amuselabs JSON") (import.addHandler import.amuselabsHtml :html "amuselabs HTML")