From 6186d7439fb7b31c6f9833569a5b775821ae3847 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 2 Mar 2021 13:44:27 +0100 Subject: [PATCH] filter invalid skylinks --- setup-scripts/blocklist-airtable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-scripts/blocklist-airtable.py b/setup-scripts/blocklist-airtable.py index e61b6f9c..7f5d4dd7 100755 --- a/setup-scripts/blocklist-airtable.py +++ b/setup-scripts/blocklist-airtable.py @@ -49,8 +49,8 @@ async def block_skylinks_from_airtable(): skylinks = [skylink for skylink in skylinks if re.search("^[a-zA-Z0-9_-]{46}$", skylink)] if len(skylinks_returned) != len(skylinks): - message = (skylinks_returned - len(skylinks)) + " of the skylinks returned from Airtable are not valid" invalid_skylinks = [str(skylink) for skylink in list(set(skylinks_returned) - set(skylinks))] + message = str(len(invalid_skylinks)) + " of the skylinks returned from Airtable are not valid" print(message) or await send_msg(client, message, file=("\n".join(invalid_skylinks))) apipassword = exec("docker exec sia cat /sia-data/apipassword")