summaryrefslogtreecommitdiff
path: root/providers
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-08-15 16:59:14 +0200
committeremkael <emkael@tlen.pl>2017-08-15 16:59:14 +0200
commit77ccbba177306d6778eb52f623baaaa0468f11b3 (patch)
tree2ad19b6387440df14c17b90d4e6f4b31b7cd2cfd /providers
parent510abf4006c2e6473a65bcdcb1d3526519202c86 (diff)
* filtering out archive articles from MotorSport feed
Diffstat (limited to 'providers')
-rw-r--r--providers/Motorsport.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/providers/Motorsport.php b/providers/Motorsport.php
index f055ad6..6faa9cc 100644
--- a/providers/Motorsport.php
+++ b/providers/Motorsport.php
@@ -84,7 +84,8 @@ class Motorsport extends \Providers\Twitter {
return array_filter(
$items,
function ($item) {
- return isset($item->content['article:published_time']);
+ $urlParts = parse_url($item->content['og:url']);
+ return isset($item->content['article:published_time']) && strpos($urlParts['path'], '/archive/') !== 0;
}
);
}