From bb9d8023ac748113d2fd9f6cf4f18f536d02a094 Mon Sep 17 00:00:00 2001 From: Mitsukarenai Date: Thu, 27 Nov 2014 17:39:59 +0100 Subject: [PATCH] TwitterXT: get using HTTPS --- bridges/TwitterBridgeExtended.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/TwitterBridgeExtended.php b/bridges/TwitterBridgeExtended.php index da1e1c58..5de3f3bb 100644 --- a/bridges/TwitterBridgeExtended.php +++ b/bridges/TwitterBridgeExtended.php @@ -16,10 +16,10 @@ class TwitterBridgeExtended extends BridgeAbstract{ public function collectData(array $param){ $html = ''; if (isset($param['q'])) { /* keyword search mode */ - $html = file_get_html('http://twitter.com/search/realtime?q='.urlencode($param['q']).'+include:retweets&src=typd') or $this->returnError('No results for this query.', 404); + $html = file_get_html('https://twitter.com/search/realtime?q='.urlencode($param['q']).'+include:retweets&src=typd') or $this->returnError('No results for this query.', 404); } elseif (isset($param['u'])) { /* user timeline mode */ - $html = file_get_html('http://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404); + $html = file_get_html('https://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404); } else { $this->returnError('You must specify a keyword (?q=...) or a Twitter username (?u=...).', 400); @@ -56,7 +56,7 @@ class TwitterBridgeExtended extends BridgeAbstract{ } // get tweet text - $item->content = 'avatar'.$item->username.' '.$item->fullname.'
'.str_replace('href="/', 'href="https://twitter.com/', $tweet->find('p.js-tweet-text', 0)->innertext).'
'; + $item->content = 'avatar'.$item->username.' '.$item->fullname.'
'.str_replace('href="/', 'href="https://twitter.com/', $tweet->find('p.js-tweet-text', 0)->innertext).'
'; // generate the title $item->title = $item->fullname . ' (@'. $item->username . ') | ' . $item->content_simple; // put out