From 8157050b9744fb28cc144d492cd6636a2e2a51d5 Mon Sep 17 00:00:00 2001 From: allthestairs <37784626+allthestairs@users.noreply.github.com> Date: Sun, 25 Mar 2018 20:14:35 -0400 Subject: [PATCH] Fix Torrenleech .torrent URLs They appear to have switched to relative links. Use the download base url with the link scraped from the page. --- couchpotato/core/media/_base/providers/torrent/torrentleech.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/media/_base/providers/torrent/torrentleech.py b/couchpotato/core/media/_base/providers/torrent/torrentleech.py index ffe41f6..da13822 100644 --- a/couchpotato/core/media/_base/providers/torrent/torrentleech.py +++ b/couchpotato/core/media/_base/providers/torrent/torrentleech.py @@ -50,7 +50,7 @@ class Base(TorrentProvider): results.append({ 'id': link['href'].replace('/torrent/', ''), 'name': six.text_type(link.string), - 'url': url['href'], + 'url': self.urls['download'] % url['href'], 'detail_url': self.urls['download'] % details['href'], 'size': self.parseSize(result.find_all('td')[4].string), 'seeders': tryInt(result.find('td', attrs = {'class': 'seeders'}).string),