From 6f731b20a9a0a6f7913b77dc9c92dd59a21279fc Mon Sep 17 00:00:00 2001 From: Dag Date: Fri, 9 Feb 2024 08:03:04 +0100 Subject: [PATCH] fix(DarkReading): official rss endpoint changed (#3967) --- bridges/DarkReadingBridge.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/bridges/DarkReadingBridge.php b/bridges/DarkReadingBridge.php index 4f1622e3..d8b88cb6 100644 --- a/bridges/DarkReadingBridge.php +++ b/bridges/DarkReadingBridge.php @@ -9,7 +9,7 @@ class DarkReadingBridge extends FeedExpander const PARAMETERS = [ [ 'feed' => [ - 'name' => 'Feed', + 'name' => 'Feed (NOT IN USE)', 'type' => 'list', 'values' => [ 'All Dark Reading Stories' => '000_AllArticles', @@ -41,17 +41,7 @@ class DarkReadingBridge extends FeedExpander public function collectData() { - $feed = $this->getInput('feed'); - $feed_splitted = explode('_', $feed); - $feed_id = $feed_splitted[0]; - $feed_name = $feed_splitted[1]; - if (empty($feed) || !ctype_digit($feed_id) || !preg_match('/[A-Za-z%20\/]/', $feed_name)) { - returnClientError('Invalid feed, please check the "feed" parameter.'); - } - $feed_url = $this->getURI() . 'rss_simple.asp'; - if ($feed_id != '000') { - $feed_url .= '?f_n=' . $feed_id . '&f_ln=' . $feed_name; - } + $feed_url = 'https://www.darkreading.com/rss.xml'; $limit = $this->getInput('limit') ?? 10; $this->collectExpandableDatas($feed_url, $limit); } @@ -71,7 +61,7 @@ class DarkReadingBridge extends FeedExpander private function extractArticleContent($article) { - $content = $article->find('div.article-content', 0)->innertext; + $content = $article->find('div.ContentModule-Wrapper', 0)->innertext; foreach ( [