[TwitterBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
fa294e2b4c
commit
351e1e9a6a
1 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ class TwitterBridge extends BridgeAbstract{
|
||||||
// get TweetID
|
// get TweetID
|
||||||
$item['id'] = $tweet->getAttribute('data-tweet-id');
|
$item['id'] = $tweet->getAttribute('data-tweet-id');
|
||||||
// get tweet link
|
// get tweet link
|
||||||
$item['uri'] = 'https://twitter.com'.$tweet->find('a.js-permalink', 0)->getAttribute('href');
|
$item['uri'] = $this->uri.$tweet->find('a.js-permalink', 0)->getAttribute('href');
|
||||||
// extract tweet timestamp
|
// extract tweet timestamp
|
||||||
$item['timestamp'] = $tweet->find('span.js-short-timestamp', 0)->getAttribute('data-time');
|
$item['timestamp'] = $tweet->find('span.js-short-timestamp', 0)->getAttribute('data-time');
|
||||||
// generate the title
|
// generate the title
|
||||||
|
@ -111,7 +111,7 @@ class TwitterBridge extends BridgeAbstract{
|
||||||
}
|
}
|
||||||
|
|
||||||
// get tweet text
|
// get tweet text
|
||||||
$cleanedTweet = str_replace('href="/', 'href="https://twitter.com/', $tweet->find('p.js-tweet-text', 0)->innertext);
|
$cleanedTweet = str_replace('href="/', 'href="'.$this->uri, $tweet->find('p.js-tweet-text', 0)->innertext);
|
||||||
|
|
||||||
// Add picture to content
|
// Add picture to content
|
||||||
$picture_html = '';
|
$picture_html = '';
|
||||||
|
|
Loading…
Reference in a new issue