Use helper
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user