Skip to content

Commit

Permalink
Fix speedcd search
Browse files Browse the repository at this point in the history
Fixes #640
  • Loading branch information
labrys committed May 31, 2016
1 parent 3d205a3 commit e47c78a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sickbeard/providers/speedcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self):
# URLs
self.url = 'https://speed.cd'
self.urls = {
'login': urljoin(self.url, 'take.login.php'),
'login': urljoin(self.url, 'takelogin.php'),
'search': urljoin(self.url, 'browse.php'),
}

Expand Down Expand Up @@ -130,7 +130,8 @@ def process_column_header(td):
continue

with BS4Parser(data, 'html5lib') as html:
torrent_table = html.find('div', class_='boxContent').find('table')
torrent_table = html.find('div', class_='boxContent')
torrent_table = torrent_table.find('table') if torrent_table else None
torrent_rows = torrent_table('tr') if torrent_table else []

# Continue only if at least one Release is found
Expand Down

0 comments on commit e47c78a

Please sign in to comment.