Use helper

This commit is contained in:
Ruud
2014-01-24 16:33:10 +01:00
parent 3101926e9b
commit cbd8981ee2

View File

@@ -1,9 +1,8 @@
from bs4 import BeautifulSoup
from couchpotato.core.helpers.variable import tryInt, splitString
from couchpotato.core.helpers.variable import tryInt, splitString, removeEmpty
from couchpotato.core.logger import CPLog
from couchpotato.core.providers.automation.base import Automation
import re
from six.moves import filter
log = CPLog(__name__)
@@ -46,7 +45,7 @@ class Letterboxd(Automation):
soup = BeautifulSoup(self.getHTMLData(self.url % username))
for movie in soup.find_all('a', attrs = {'class': 'frame'}):
match = filter(None, self.pattern.split(movie['title']))
match = removeEmpty(self.pattern.split(movie['title']))
movies.append({'title': match[0], 'year': match[1] })
return movies