1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-12 11:34:09 +02:00

fix(duckduckgo): order by date (#3689)

This commit is contained in:
Dag
2023-09-23 17:50:41 +02:00
committed by GitHub
parent 07f49225d9
commit cb6c931b1f
6 changed files with 55 additions and 37 deletions

View File

@@ -10,14 +10,19 @@ class EngadgetBridge extends FeedExpander
public function collectData()
{
$this->collectExpandableDatas(static::URI . 'rss.xml', 15);
$max = 10;
$this->collectExpandableDatas(static::URI . 'rss.xml', $max);
}
protected function parseItem($newsItem)
{
$item = parent::parseItem($newsItem);
// $articlePage gets the entire page's contents
$articlePage = getSimpleHTMLDOM($newsItem->link);
$url = (string) $newsItem->link;
if (!$url) {
return $item;
}
// todo: remove querystring tracking
$articlePage = getSimpleHTMLDOM($url);
// figure contain's the main article image
$article = $articlePage->find('figure', 0);
// .article-text has the actual article