mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 23:29:56 +03:00
[PikabuBridge] Marking posts from "Как бы Новости" section, which are funny and deliberately fake (#2032)
This commit is contained in:
parent
40c84b5dc3
commit
0c8fabeb11
1 changed files with 11 additions and 3 deletions
|
@ -123,17 +123,25 @@ class PikabuBridge extends BridgeAbstract {
|
|||
}
|
||||
}
|
||||
|
||||
$title = $post->find('.story__title-link', 0);
|
||||
$title_element = $post->find('.story__title-link', 0);
|
||||
|
||||
$title = $title_element->plaintext;
|
||||
$community_link = $post->find('.story__community-link', 0);
|
||||
// adding special marker for "Maybe News" section
|
||||
// these posts are fake
|
||||
if (!is_null($community_link) && $community_link->getAttribute('href') == '/community/maybenews') {
|
||||
$title = '[' . $community_link->innertext . '] ' . $title;
|
||||
}
|
||||
|
||||
$item = array();
|
||||
$item['categories'] = $categories;
|
||||
$item['author'] = $post->find('.user__nick', 0)->innertext;
|
||||
$item['title'] = $title->plaintext;
|
||||
$item['title'] = $title;
|
||||
$item['content'] = strip_tags(
|
||||
backgroundToImg($post->find('.story__content-inner', 0)->innertext),
|
||||
'<br><p><img><a>
|
||||
');
|
||||
$item['uri'] = $title->href;
|
||||
$item['uri'] = $title_element->href;
|
||||
$item['timestamp'] = strtotime($time->getAttribute('datetime'));
|
||||
$this->items[] = $item;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue