From 7a40584864fa5d833ac981cafa1450d54d6cd55e Mon Sep 17 00:00:00 2001 From: Mitsukarenai Date: Fri, 26 Jun 2015 11:55:11 +0200 Subject: [PATCH] [TwitterBridge*] update query URL for live feed --- bridges/TwitterBridge.php | 2 +- bridges/TwitterBridgeClean.php | 2 +- bridges/TwitterBridgeExtended.php | 2 +- bridges/TwitterBridgeTweaked.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php index 5f5aa81e..91101e39 100644 --- a/bridges/TwitterBridge.php +++ b/bridges/TwitterBridge.php @@ -19,7 +19,7 @@ class TwitterBridge extends BridgeAbstract{ $html = ''; if (isset($param['q'])) { /* keyword search mode */ $this->request = $param['q']; - $html = file_get_html('http://twitter.com/search/realtime?q='.urlencode($this->request).'+include:retweets&src=typd') or $this->returnError('No results for this query.', 404); + $html = file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404); } elseif (isset($param['u'])) { /* user timeline mode */ $this->request = $param['u']; diff --git a/bridges/TwitterBridgeClean.php b/bridges/TwitterBridgeClean.php index 69d9f25c..0db6a48e 100644 --- a/bridges/TwitterBridgeClean.php +++ b/bridges/TwitterBridgeClean.php @@ -19,7 +19,7 @@ class TwitterBridgeClean extends BridgeAbstract{ $html = ''; if (isset($param['q'])) { /* keyword search mode */ $this->request = $param['q']; - $html = file_get_html('http://twitter.com/search/realtime?q='.urlencode($this->request).'+include:retweets&src=typd') or $this->returnError('No results for this query.', 404); + $html = file_get_html('https://twitter.com/search?q='.urlencode($this->request).'&f=tweets') or $this->returnError('No results for this query.', 404); } elseif (isset($param['u'])) { /* user timeline mode */ $this->request = $param['u']; diff --git a/bridges/TwitterBridgeExtended.php b/bridges/TwitterBridgeExtended.php index 5de3f3bb..d1176355 100644 --- a/bridges/TwitterBridgeExtended.php +++ b/bridges/TwitterBridgeExtended.php @@ -16,7 +16,7 @@ class TwitterBridgeExtended extends BridgeAbstract{ public function collectData(array $param){ $html = ''; if (isset($param['q'])) { /* keyword search mode */ - $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); + $html = file_get_html('https://twitter.com/search?q='.urlencode($param['q']).'&f=tweets') or $this->returnError('No results for this query.', 404); } elseif (isset($param['u'])) { /* user timeline mode */ $html = file_get_html('https://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404); diff --git a/bridges/TwitterBridgeTweaked.php b/bridges/TwitterBridgeTweaked.php index 6d7b7b83..92825d12 100644 --- a/bridges/TwitterBridgeTweaked.php +++ b/bridges/TwitterBridgeTweaked.php @@ -73,7 +73,7 @@ class TwitterBridgeTweaked extends BridgeAbstract{ public function collectData(array $param){ $html = ''; if (isset($param['q'])) { /* keyword search mode */ - $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); + $html = file_get_html('https://twitter.com/search?q='.urlencode($param['q']).'&f=tweets') or $this->returnError('No results for this query.', 404); } elseif (isset($param['u'])) { /* user timeline mode */ $html = file_get_html('https://twitter.com/'.urlencode($param['u']).'/with_replies') or $this->returnError('Requested username can\'t be found.', 404);