diff --git a/sickbeard/providers/scc.py b/sickbeard/providers/scc.py index 1706b166..cc59204f 100644 --- a/sickbeard/providers/scc.py +++ b/sickbeard/providers/scc.py @@ -155,13 +155,13 @@ class SCCProvider(generic.TorrentProvider): if mode == 'Season': searchURL = self.urls['archive'] % (search_string) - data = self.getURL(searchURL, headers=self.headers) + data = [self.getURL(searchURL, headers=self.headers)] else: searchURL = self.urls['search'] % (search_string, self.categories) nonsceneSearchURL = self.urls['nonscene'] % (search_string) foreignSearchURL = self.urls['foreign'] % (search_string) data = [self.getURL(searchURL, headers=self.headers), - self.getURL(nonsceneSearchURL, headers=self.headers), + self.getURL(nonsceneSearchURL, headers=self.headers), self.getURL(foreignSearchURL, headers=self.headers)] logger.log(u"Search string: " + nonsceneSearchURL, logger.DEBUG) logger.log(u"Search string: " + foreignSearchURL, logger.DEBUG) @@ -174,10 +174,10 @@ class SCCProvider(generic.TorrentProvider): try: for dataItem in data: html = BeautifulSoup(dataItem, features=["html5lib", "permissive"]) - + torrent_table = html.find('table', attrs={'id': 'torrents-table'}) torrent_rows = torrent_table.find_all('tr') if torrent_table else [] - + #Continue only if one Release is found if len(torrent_rows) < 2: if html.title: @@ -186,31 +186,34 @@ class SCCProvider(generic.TorrentProvider): source = self.name logger.log(u"The Data returned from " + source + " does not contain any torrent", logger.DEBUG) continue - + for result in torrent_table.find_all('tr')[1:]: - + try: link = result.find('td', attrs={'class': 'ttr_name'}).find('a') url = result.find('td', attrs={'class': 'td_dl'}).find('a') title = link.string + if re.search('\.\.\.', title): + details_html = BeautifulSoup(self.getURL(self.url + "/" + link['href'])) + title = re.search('(?<=").+(?SceneAccess \| Non-Scene', dataItem): logger.log(u"Found result: " + title + "(" + nonsceneSearchURL + ")", logger.DEBUG) - elif re.search('