Make sure name is string type, not bs4 class

This commit is contained in:
Ruud
2014-03-10 14:10:29 +01:00
parent bca597c4e2
commit bf9a43b3d1
4 changed files with 4 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ class IPTorrents(TorrentProvider):
torrent = cells[1].find('a')
torrent_id = torrent['href'].replace('/details.php?id=', '')
torrent_name = torrent.string
torrent_name = unicode(torrent.string)
torrent_download_url = self.urls['base_url'] + (result.find_all('td')[3].find('a'))['href'].replace(' ', '.')
torrent_details_url = self.urls['base_url'] + torrent['href']
torrent_size = self.parseSize(result.find_all('td')[5].string)

View File

@@ -54,7 +54,7 @@ class PublicHD(TorrentMagnetProvider):
results.append({
'id': url['id'][0],
'name': info_url.string,
'name': unicode(info_url.string),
'url': download['href'],
'detail_url': self.urls['detail'] % url['id'][0],
'size': self.parseSize(result.find_all('td')[7].string),

View File

@@ -88,7 +88,7 @@ class ThePirateBay(TorrentMagnetProvider):
results.append({
'id': re.search('/(?P<id>\d+)/', link['href']).group('id'),
'name': link.string,
'name': unicode(link.string),
'url': download['href'],
'detail_url': self.getDomain(link['href']),
'size': self.parseSize(size),

View File

@@ -56,7 +56,7 @@ class TorrentLeech(TorrentProvider):
results.append({
'id': link['href'].replace('/torrent/', ''),
'name': link.string,
'name': unicode(link.string),
'url': self.urls['download'] % url['href'],
'detail_url': self.urls['download'] % details['href'],
'size': self.parseSize(result.find_all('td')[4].string),