added article categories for CaschyBridge (#3379)

* added article categories

* whitespace
This commit is contained in:
Tone 2023-05-08 16:21:39 +02:00 committed by GitHub
parent a1b6bca581
commit f26808d22c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,11 @@ class CaschyBridge extends FeedExpander
// reload html, as remove() is buggy // reload html, as remove() is buggy
$article = str_get_html($article->outertext); $article = str_get_html($article->outertext);
$categories = $article->find('div.post-category a');
foreach ($categories as $category) {
$item['categories'][] = $category->plaintext;
}
$content = $article->find('div.entry-inner', 0); $content = $article->find('div.entry-inner', 0);
$item['content'] = $content; $item['content'] = $content;