diff options
author | emkael <emkael@tlen.pl> | 2017-08-15 16:59:14 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-08-15 16:59:14 +0200 |
commit | 77ccbba177306d6778eb52f623baaaa0468f11b3 (patch) | |
tree | 2ad19b6387440df14c17b90d4e6f4b31b7cd2cfd /providers | |
parent | 510abf4006c2e6473a65bcdcb1d3526519202c86 (diff) |
* filtering out archive articles from MotorSport feed
Diffstat (limited to 'providers')
-rw-r--r-- | providers/Motorsport.php | 3 |
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; } ); } |