[TwitterBridge] ignore promoted tweets

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2017-08-03 00:26:32 +02:00 committed by Pierre Mazière
parent a4b9611e66
commit 485b465a24

View file

@ -106,6 +106,14 @@ class TwitterBridge extends BridgeAbstract {
$invisible->outertext = '';
}
// Skip protmoted tweets
$heading=$tweet->previousSibling();
if(!is_null($heading) &&
$heading->getAttribute('class')==='promoted-tweet-heading'
){
continue;
}
$item = array();
// extract username and sanitize
$item['username'] = $tweet->getAttribute('data-screen-name');