From e1b7ffdc81146b84669df997d293688f2d1731dc Mon Sep 17 00:00:00 2001 From: ORelio Date: Wed, 3 Feb 2016 20:37:09 +0100 Subject: [PATCH] [T411] Change encoding to UTF-8 - Stop encoding to UTF-8, their website is now natively in UTF-8 - More error handling --- bridges/T411Bridge.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bridges/T411Bridge.php b/bridges/T411Bridge.php index e1e7a951..da2e9d05 100644 --- a/bridges/T411Bridge.php +++ b/bridges/T411Bridge.php @@ -37,7 +37,9 @@ class T411Bridge extends BridgeAbstract { //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'; $html = file_get_html($url) or $this->returnError('Could not request t411: '.$url, 500); - $results = $html->find('table.results')[0] or $this->returnError('No results from t411: '.$url, 500); + $results = $html->find('table.results', 0); + if (is_null($results)) + $this->returnError('No results from t411: '.$url, 500); $limit = 0; //Process each item individually @@ -77,7 +79,7 @@ class T411Bridge extends BridgeAbstract { $item->author = $item_author; $item->timestamp = $item_date; $item->thumbnailUri = $item_image; - $item->content = utf8_encode($item_desc->innertext); + $item->content = $item_desc->innertext; $this->items[] = $item; $limit++; }