From 850d819b29123322829135a41eb0d068efe5204a Mon Sep 17 00:00:00 2001 From: alistairjcbrown <635903+alistairjcbrown@users.noreply.github.com> Date: Wed, 5 Aug 2026 05:13:56 +0000 Subject: [PATCH] Update title normalization test --- common/known-removable-phrases.js | 1 + common/tests/test-titles.json | 48 +++++++++++++++++++++++++ sources/eventbrite.co.uk/find-events.js | 7 ++-- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/common/known-removable-phrases.js b/common/known-removable-phrases.js index 1722f3b1..07c38a90 100644 --- a/common/known-removable-phrases.js +++ b/common/known-removable-phrases.js @@ -263,6 +263,7 @@ const knownRemovablePhrases = [ "Film Screening and Q&A", "screening and Q&A with Byline Times", "Special Screening and Q&A", + "Documentary pre-screening and Q&A", "Pre-screening and Q&A", "Screening and Q&A", ": screening and discussion", diff --git a/common/tests/test-titles.json b/common/tests/test-titles.json index 3979e834..a9a7353e 100644 --- a/common/tests/test-titles.json +++ b/common/tests/test-titles.json @@ -85746,5 +85746,53 @@ { "input": "The Valley of the Bees", "output": "valley of the bees" + }, + { + "input": "gb André Rieu 2026 Christmas Concert Let it snow", + "output": "andre rieu 2026 christmas concert let it snow" + }, + { + "input": "Vishwanath & Sons (Tamil)", + "output": "vishwanath sons" + }, + { + "input": "DC", + "output": "dc" + }, + { + "input": "Harry Potter and the Deathly Hallows: Part 2 (2011)", + "output": "harry potter the deathly hallows 2 (2011)" + }, + { + "input": "Harry Potter and the Half-Blood Prince (2009)", + "output": "harry potter the halfblood prince (2009)" + }, + { + "input": "Harry Potter and the Order of the Phoenix (2007)", + "output": "harry potter the order of the phoenix (2007)" + }, + { + "input": "Prometheus Summer Party", + "output": "prometheus summer party" + }, + { + "input": "VOICES UNHEARD: Documentary pre-screening and Q&A", + "output": "voices unheard" + }, + { + "input": "I Saw the TV Glow + Surprise Short Films", + "output": "i saw the tv glow" + }, + { + "input": "I Want Your Sex – Preview", + "output": "i want your sex" + }, + { + "input": "Kino Industry Session: Supprting Emerging Talent with BIFA & Beyond", + "output": "kino industry session supprting emerging talent with bifa beyond" + }, + { + "input": "EXCHANGE CINEMA CLUB - SHORT TERM 12", + "output": "short term 12" } ] diff --git a/sources/eventbrite.co.uk/find-events.js b/sources/eventbrite.co.uk/find-events.js index 1acb3608..9e18d80d 100644 --- a/sources/eventbrite.co.uk/find-events.js +++ b/sources/eventbrite.co.uk/find-events.js @@ -12,6 +12,7 @@ const { createOverview, createPerformance } = require("../../common/utils"); const { parseDate } = require("./utils"); const attributes = require("./attributes"); const { venueMatchesCinema } = require("../../common/source-utils"); +const { isNotNonFilmEvent } = require("../../common/is-non-film-event"); function getEventDescription(details) { if (!details) return ""; @@ -143,9 +144,9 @@ async function findEvents(cinema) { ); }); - return filteredEvents.map((event) => - convertEventbriteEvent(event, moviePages[event.url]), - ); + return filteredEvents + .map((event) => convertEventbriteEvent(event, moviePages[event.url])) + .filter(isNotNonFilmEvent); } module.exports = findEvents;