From 6b3ab9ecfd3e3e17e80585fd46670f36b19d60e7 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 31 Mar 2021 18:55:43 +0100 Subject: [PATCH 1/2] [TwitScoopBridge] Remove less than (<) character from item title --- bridges/TwitScoopBridge.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bridges/TwitScoopBridge.php b/bridges/TwitScoopBridge.php index 2e867ed922a..471a4e22b78 100644 --- a/bridges/TwitScoopBridge.php +++ b/bridges/TwitScoopBridge.php @@ -106,10 +106,15 @@ public function collectData() { $name = rtrim($li->find('span.trend.name', 0)->plaintext, ' '); $tweets = str_replace(' tweets', '', $li->find('span.tweets', 0)->plaintext); - $tweets = str_replace('<', '<', $tweets); + $tweets = str_replace('<', '', $tweets); $item['title'] = '#' . $number . ' - ' . $name . ' (' . $tweets . ' tweets)'; $item['uri'] = 'https://twitter.com/search?q=' . rawurlencode($name); + + if ($tweets === '10K') { + $tweets = 'less than 10K'; + } + $item['content'] = <<Rank

{$number}

From 1e1029db3c4ce8243b19f9c9c8de24789d2190d6 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 31 Mar 2021 19:24:39 +0100 Subject: [PATCH 2/2] [TwitScoopBridge] Run phpcbf One day I'll remember to run phpcbf before committing. --- bridges/TwitScoopBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/TwitScoopBridge.php b/bridges/TwitScoopBridge.php index 471a4e22b78..5d1e74a12f8 100644 --- a/bridges/TwitScoopBridge.php +++ b/bridges/TwitScoopBridge.php @@ -110,11 +110,11 @@ public function collectData() { $item['title'] = '#' . $number . ' - ' . $name . ' (' . $tweets . ' tweets)'; $item['uri'] = 'https://twitter.com/search?q=' . rawurlencode($name); - + if ($tweets === '10K') { $tweets = 'less than 10K'; } - + $item['content'] = <<Rank

{$number}