[NPRBridge] Add missing tag and remove extra HTML elements (#4227)

This commit is contained in:
July 2024-08-21 17:05:29 -04:00 committed by GitHub
parent 06a8896000
commit 4a3919c1a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -192,9 +192,9 @@ class NPRBridge extends FeedExpander
// get tags, program/series names // get tags, program/series names
$item['categories'] = []; $item['categories'] = [];
$tags = '.tag, .program-block > a, .branding__title'; $tags = '.tag, .program-block > a, .branding__title, article h3.slug';
foreach ($html->find($tags) as $tag) { foreach ($html->find($tags) as $tag) {
$item['categories'][] = $tag->innertext; $item['categories'][] = $tag->plaintext;
} }
$item['categories'] = array_unique($item['categories']); $item['categories'] = array_unique($item['categories']);