mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 23:29:56 +03:00
added article categories for GolemBridge (#3377)
* added article categories for GolemBridge * tabs are bad, spaces good * fixed duplicate categories on multi-page articles
This commit is contained in:
parent
ec091fb747
commit
a1b6bca581
1 changed files with 8 additions and 0 deletions
|
@ -88,6 +88,14 @@ class GolemBridge extends FeedExpander
|
|||
$item['author'] = $author->plaintext;
|
||||
}
|
||||
|
||||
$categories = $articlePage->find('ul.tags__list li');
|
||||
foreach ($categories as $category) {
|
||||
$trimmedcategories[] = trim(html_entity_decode($category->plaintext));
|
||||
}
|
||||
if (isset($trimmedcategories)) {
|
||||
$item['categories'] = array_unique($trimmedcategories);
|
||||
}
|
||||
|
||||
$item['content'] .= $this->extractContent($articlePage);
|
||||
|
||||
// next page
|
||||
|
|
Loading…
Add table
Reference in a new issue