Make sure name is string type, not bs4 class
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user