From 641d5880c7c1af09701d4b1950047a994f75c8f7 Mon Sep 17 00:00:00 2001 From: ORelio Date: Sat, 27 Feb 2016 12:56:36 +0100 Subject: [PATCH 1/5] [T411] Domain name change T411 changeid their domain name to t411.ch --- bridges/T411Bridge.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/T411Bridge.php b/bridges/T411Bridge.php index 54904cce..6d794cb5 100644 --- a/bridges/T411Bridge.php +++ b/bridges/T411Bridge.php @@ -5,7 +5,7 @@ class T411Bridge extends BridgeAbstract { $this->maintainer = "ORelio"; $this->name = "T411"; - $this->uri = "https://t411.in/"; + $this->uri = $this->getURI(); $this->description = "Returns the 5 newest torrents with specified search terms
Use url part after '?' mark when using their search engine"; $this->update = "2016-02-06"; @@ -34,8 +34,8 @@ class T411Bridge extends BridgeAbstract { $this->returnError('You must specify a search criteria', 400); } - //Retrieve torrent listing as truncated rss, which does not contain torrent description - $url = 'http://www.t411.in/torrents/search/?'.$param['search'].'&order=added&type=desc'; + //Retrieve torrent listing from search results, which does not contain torrent description + $url = $this->getURI().'torrents/search/?'.$param['search'].'&order=added&type=desc'; $html = file_get_html($url) or $this->returnError('Could not request t411: '.$url, 500); $results = $html->find('table.results', 0); if (is_null($results)) @@ -64,7 +64,7 @@ class T411Bridge extends BridgeAbstract { $item_author = $item_html->find('a.profile', 0)->innertext; //Retrieve image for thumbnail or generic logo fallback - $item_image = 'http://www.t411.in/themes/blue/images/logo.png'; + $item_image = $this->getURI().'themes/blue/images/logo.png'; foreach ($item_desc->find('img') as $img) { if (strpos($img->src, 'prez') === false) { $item_image = $img->src; @@ -92,7 +92,7 @@ class T411Bridge extends BridgeAbstract { } public function getURI() { - return 'https://t411.in'; + return 'https://t411.ch/'; } public function getCacheDuration() { From 9df5913d6ba1e7efa817683a1f3771c1637dfa55 Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 6 Mar 2016 19:03:24 +0100 Subject: [PATCH 2/5] [T411] Use torrent id as permalink This way links are not broken if the torrent is renamed. --- bridges/T411Bridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/T411Bridge.php b/bridges/T411Bridge.php index 6d794cb5..92f3c764 100644 --- a/bridges/T411Bridge.php +++ b/bridges/T411Bridge.php @@ -52,7 +52,7 @@ class T411Bridge extends BridgeAbstract { usleep(500000); //So we need to wait (500ms) //Retrieve data from RSS entry - $item_uri = 'http://'.ExtractFromDelimiters($element->outertext, 'getURI().'torrents/details/?id='.ExtractFromDelimiters($element->find('a.nfo', 0)->outertext, '?id=', '"'); $item_title = ExtractFromDelimiters($element->outertext, '" title="', '"'); $item_date = strtotime($element->find('dd', 0)->plaintext); From c2769c89992b2c77810a2066b2c03c900ff2261d Mon Sep 17 00:00:00 2001 From: ORelio Date: Wed, 16 Mar 2016 19:51:54 +0100 Subject: [PATCH 3/5] [CNET] Fix content extraction --- bridges/CNETBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php index ec7decf0..42c78a94 100644 --- a/bridges/CNETBridge.php +++ b/bridges/CNETBridge.php @@ -9,7 +9,7 @@ class CNETBridge extends BridgeAbstract { $this->name = 'CNET News'; $this->uri = 'http://www.cnet.com/'; $this->description = 'Returns the newest articles.
You may specify a topic found in some section URLs, else all topics are selected.'; - $this->update = '2016-02-06'; + $this->update = '2016-03-16'; $this->parameters[] = '[ @@ -76,7 +76,7 @@ class CNETBridge extends BridgeAbstract { if (is_object($article_thumbnail)) $article_thumbnail = $article_thumbnail->find('img', 0)->src; - $article_content = trim(CleanArticle(ExtractFromDelimiters($article_html, '
', '