fix thepiratebay.getId

This commit is contained in:
j 2008-05-25 12:36:37 +02:00
parent 55ff7463b5
commit e8d37289c0

View file

@ -60,9 +60,7 @@ def findMovieByImdb(imdb):
def getId(piratebayId):
if piratebayId.startswith('http://torrents.thepiratebay.org/'):
piratebayId = piratebayId.split('org/')[1]
if 'tor/' in piratebayId:
piratebayId = piratebayId.split('tor/')[1]
d = findRe(piratebayId, "/(\d+)")
d = findRe(piratebayId, "tor/(\d+)")
if d:
piratebayId = d
return piratebayId