diff --git a/cloud/scrapers/filmhuisdenhaag.ts b/cloud/scrapers/filmhuisdenhaag.ts index e238ff4..9b9bc59 100644 --- a/cloud/scrapers/filmhuisdenhaag.ts +++ b/cloud/scrapers/filmhuisdenhaag.ts @@ -71,6 +71,14 @@ const cleanTitle = (title: string) => .replace(/ -(.*?)$/, ''), // actually remove the last dash and everything after it (bit questionable) ) +const hasEnglishSubtitles = (item) => { + return ( + item.subtitle === 'Engels' || + item.subtitle === 'English' || + item.characteristics.includes('EN subs') + ) +} + const extractFromMainPage = async (): Promise => { const apiResponse: FilmhuisDenhaagAPIResponse = await got( 'https://filmhuisdenhaag.nl/api/program', @@ -91,8 +99,7 @@ const extractFromMainPage = async (): Promise => { }) const screenings: Screening[] = programs - // .filter((item) => item.subtitle === 'Engels' || item.subtitle === 'English') // removed as it seems to always show "Nederlands" now - .filter((item) => item.subs === 'EN subs') + .filter(hasEnglishSubtitles) .map((item) => { const [year, month, day] = item.starts_at_date .split('-')