mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 08:28:46 +00:00
Merge branch 'ImproveBridge' of https://github.com/logmanoriginal/rss-bridge
This commit is contained in:
commit
155c0ac6f0
@ -32,6 +32,12 @@ class TwitterBridge extends BridgeAbstract {
|
|||||||
'name' => 'Without replies',
|
'name' => 'Without replies',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'title' => 'Only return initial tweets'
|
'title' => 'Only return initial tweets'
|
||||||
|
),
|
||||||
|
'noretweet' => array(
|
||||||
|
'name' => 'Without retweets',
|
||||||
|
'required' => false,
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => 'Hide retweets'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -82,6 +88,13 @@ class TwitterBridge extends BridgeAbstract {
|
|||||||
$hidePictures = $this->getInput('nopic');
|
$hidePictures = $this->getInput('nopic');
|
||||||
|
|
||||||
foreach($html->find('div.js-stream-tweet') as $tweet){
|
foreach($html->find('div.js-stream-tweet') as $tweet){
|
||||||
|
|
||||||
|
// Skip retweets?
|
||||||
|
if($this->getInput('noretweet')
|
||||||
|
&& $tweet->getAttribute('data-screen-name') !== $this->getInput('u')){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$item = array();
|
$item = array();
|
||||||
// extract username and sanitize
|
// extract username and sanitize
|
||||||
$item['username'] = $tweet->getAttribute('data-screen-name');
|
$item['username'] = $tweet->getAttribute('data-screen-name');
|
||||||
|
Loading…
Reference in New Issue
Block a user