From 91fe6c4accd308427f4f7a8572d88cc64abcf7d1 Mon Sep 17 00:00:00 2001 From: ORelio Date: Sat, 13 Feb 2016 14:01:21 +0100 Subject: [PATCH] [t411] Increase item limit On searches for popular keywords, a feed reader not reading the feed often enough can miss items (ie more than 5 items were added since last fetch) so this change increases the limit from 5 items to 10 items, and retrieves pages faster to compensate (500ms seems enough for not spamming t411). --- bridges/T411Bridge.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bridges/T411Bridge.php b/bridges/T411Bridge.php index da2e9d0..54904cc 100644 --- a/bridges/T411Bridge.php +++ b/bridges/T411Bridge.php @@ -7,7 +7,7 @@ class T411Bridge extends BridgeAbstract { $this->name = "T411"; $this->uri = "https://t411.in/"; $this->description = "Returns the 5 newest torrents with specified search terms
Use url part after '?' mark when using their search engine"; - $this->update = "2015-12-17"; + $this->update = "2016-02-06"; $this->parameters[] = '[ @@ -46,10 +46,10 @@ class T411Bridge extends BridgeAbstract { foreach($results->find('tr') as $element) { //Limit total amount of requests - if ($limit < 5) { + if ($limit < 10) { //Requests are rate-limited - sleep(1); //So we need to wait + usleep(500000); //So we need to wait (500ms) //Retrieve data from RSS entry $item_uri = 'http://'.ExtractFromDelimiters($element->outertext, 'find('img') as $img) { - if (strpos($img->src, 'dreamprez') === false) { + if (strpos($img->src, 'prez') === false) { $item_image = $img->src; break; }