From bf2e7cb7cf6c368327f16abdc43cc0b608868812 Mon Sep 17 00:00:00 2001 From: Filip Rysavy <29089732+firyx@users.noreply.github.com> Date: Thu, 18 Nov 2021 13:04:20 +0100 Subject: [PATCH] Add Airtable skylinks whitespace trimming --- changelog/items/other/trim-airtable-skylinks.md | 1 + setup-scripts/blocklist-airtable.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog/items/other/trim-airtable-skylinks.md diff --git a/changelog/items/other/trim-airtable-skylinks.md b/changelog/items/other/trim-airtable-skylinks.md new file mode 100644 index 00000000..a63a90d0 --- /dev/null +++ b/changelog/items/other/trim-airtable-skylinks.md @@ -0,0 +1 @@ +- Add trimming Airtable skylinks from Takedown Request table. \ No newline at end of file diff --git a/setup-scripts/blocklist-airtable.py b/setup-scripts/blocklist-airtable.py index e3aecd05..31d8ee19 100755 --- a/setup-scripts/blocklist-airtable.py +++ b/setup-scripts/blocklist-airtable.py @@ -100,8 +100,8 @@ async def block_skylinks_from_airtable(): entry["fields"].get(AIRTABLE_FIELD, "") for entry in data["records"] ] skylinks = [ - skylink for skylink in skylinks if skylink - ] # filter empty skylinks, most likely empty rows + skylink.strip() for skylink in skylinks if skylink + ] # filter empty skylinks, most likely empty rows, trim whitespace offset = data.get("offset")