From c4e6dea1c164276b48650fac16f71dceedef5205 Mon Sep 17 00:00:00 2001
From: Clement ZOTTI <clement.zotti@sfr.fr>
Date: Sun, 20 May 2018 19:00:18 -0400
Subject: [PATCH] Iterate on each row of the table.

---
 sickbeard/providers/torrent9.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sickbeard/providers/torrent9.py b/sickbeard/providers/torrent9.py
index d16d363f3..4c41f54c1 100644
--- a/sickbeard/providers/torrent9.py
+++ b/sickbeard/providers/torrent9.py
@@ -80,7 +80,12 @@ class Torrent9Provider(TorrentProvider):
                     continue
 
                 with BS4Parser(data, 'html5lib') as html:
-                    torrent_rows = html.find('div', {'class': 'table-responsive'})
+                    torrent_table = html.find('div', {'class': 'table-responsive'})
+                    if torrent_table is not None:
+                        torrent_rows = torrent_table.findAll('tr')
+                    else:
+                        torrent_rows = None
+
                     if not torrent_rows:
                         continue
                     for result in torrent_rows:
-- 
GitLab