Browse Source

Don't error out on faulty PublicHD page. fix #2014

pull/2096/merge
Ruud 12 years ago
parent
commit
62c6fd2e40
  1. 5
      couchpotato/core/providers/torrent/publichd/main.py

5
couchpotato/core/providers/torrent/publichd/main.py

@ -67,10 +67,15 @@ class PublicHD(TorrentMagnetProvider):
log.error('Failed getting results from %s: %s', (self.getName(), traceback.format_exc()))
def getMoreInfo(self, item):
try:
full_description = self.getCache('publichd.%s' % item['id'], item['detail_url'], cache_timeout = 25920000)
html = BeautifulSoup(full_description)
nfo_pre = html.find('div', attrs = {'id':'torrmain'})
description = toUnicode(nfo_pre.text) if nfo_pre else ''
except:
log.error('Failed getting more info for %s', item['name'])
description = ''
item['description'] = description
return item

Loading…
Cancel
Save