From d14bf8b99fd643d7fb4ed5d7a4654287cb42731c Mon Sep 17 00:00:00 2001
From: PHD <phd59fr@gmail.com>
Date: Tue, 5 Dec 2017 02:07:38 +0100
Subject: [PATCH] hot fix for ygg (#4170)

---
 sickbeard/providers/yggtorrent.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sickbeard/providers/yggtorrent.py b/sickbeard/providers/yggtorrent.py
index f74399b98..969892fe0 100644
--- a/sickbeard/providers/yggtorrent.py
+++ b/sickbeard/providers/yggtorrent.py
@@ -48,7 +48,7 @@ class YggTorrentProvider(TorrentProvider):  # pylint: disable=too-many-instance-
         self.minleech = None
 
         # URLs
-        self.url = 'https://yggtorrent.com/'
+        self.url = 'https://ww1.yggtorrent.com/'
         self.urls = {
             'login': urljoin(self.url, 'user/login'),
             'search': urljoin(self.url, 'engine/search'),
@@ -121,10 +121,11 @@ class YggTorrentProvider(TorrentProvider):  # pylint: disable=too-many-instance-
                             cells = result('td')
                             if len(cells) < 5:
                                 continue
-
+                            
+                            download_url = ""
                             title = cells[0].find('a', class_='torrent-name').get_text(strip=True)
                             for download_img in cells[0].select('a[href] img'):                                   
-                                if download_img['src'] == "https://yggtorrent.com/static/icons/icon_download.gif":
+                                if download_img['src'] == urljoin(self.url,"static/icons/icon_download.gif"):
                                     download_url = urljoin(self.url, download_img.parent['href'])
                                     break
 
-- 
GitLab