1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Fix for RARBG provider

Manage the case where the torrent name got spaces in it
This commit is contained in:
CoRpO 2015-02-18 09:15:15 +01:00
parent ba13cc532e
commit 973a1a8bef

View File

@ -198,7 +198,7 @@ class RarbgProvider(generic.TorrentProvider):
torrent_name = str(torrentName)
torrentId = result.find_all('td')[1].find_all('a')[0]['href'][1:].replace(
'torrent/', '')
torrent_download_url = (self.urls['download'] % (torrentId, torrent_name + '-[rarbg.com].torrent')).encode('utf8')
torrent_download_url = (self.urls['download'] % (torrentId, urllib.quote(torrent_name) + '-[rarbg.com].torrent')).encode('utf8')
except (AttributeError, TypeError):
continue