diff --git a/README.md b/README.md index 00921ae..aebf591 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ CouchPotato ===== [![Join the chat at https://gitter.im/CouchPotato/CouchPotatoServer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CouchPotato/CouchPotatoServer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://travis-ci.org/CouchPotato/CouchPotatoServer.svg?branch=develop)](https://travis-ci.org/CouchPotato/CouchPotatoServer) -[![Coverage Status](https://coveralls.io/repos/CouchPotato/CouchPotatoServer/badge.svg?branch=develop&service=github)](https://coveralls.io/github/CouchPotato/CouchPotatoServer?branch=develop) +[![Build Status](https://travis-ci.org/CouchPotato/CouchPotatoServer.svg?branch=master)](https://travis-ci.org/CouchPotato/CouchPotatoServer) +[![Coverage Status](https://coveralls.io/repos/CouchPotato/CouchPotatoServer/badge.svg?branch=master&service=github)](https://coveralls.io/github/CouchPotato/CouchPotatoServer?branch=master) CouchPotato (CP) is an automatic NZB and torrent downloader. You can keep a "movies I want"-list and it will search for NZBs/torrents of these movies every X hours. Once a movie is found, it will send it to SABnzbd or download the torrent to a specified directory. diff --git a/couchpotato/core/media/movie/providers/automation/letterboxd.py b/couchpotato/core/media/movie/providers/automation/letterboxd.py index e1fcddb..0de8816 100644 --- a/couchpotato/core/media/movie/providers/automation/letterboxd.py +++ b/couchpotato/core/media/movie/providers/automation/letterboxd.py @@ -13,7 +13,7 @@ autoload = 'Letterboxd' class Letterboxd(Automation): - url = 'http://letterboxd.com/%s/watchlist/' + url = 'http://letterboxd.com/%s/watchlist/page/%d/' pattern = re.compile(r'(.*)\((\d*)\)') interval = 1800 @@ -48,16 +48,28 @@ class Letterboxd(Automation): soup = BeautifulSoup(self.getHTMLData(self.url % username)) - for movie in soup.find_all('li', attrs = {'class': 'poster-container'}): - img = movie.find('img', movie) - title = img.get('alt') + pagination_items = soup.find_all('li', attrs={'class': 'paginate-page'}) + pages = range(1, len(pagination_items) + 1) if pagination_items else [1] - movies.append({ - 'title': title - }) + for page in pages: + soup = BeautifulSoup(self.getHTMLData(self.url % (username, page))) + # soup = BeautifulSoup(Plugin.urlopen(self, url=self.url % (username, page))) + movies += self.getMoviesFromHTML(soup) return movies + def getMoviesFromHTML(self, html): + movies = [] + + for movie in html.find_all('li', attrs={'class': 'poster-container'}): + img = movie.find('img') + title = img.get('alt') + + movies.append({ + 'title': title + }) + + return movies config = [{ 'name': 'letterboxd', diff --git a/version.py b/version.py index d3f24ba..12e96b5 100644 --- a/version.py +++ b/version.py @@ -1,2 +1,2 @@ VERSION = None -BRANCH = 'develop' +BRANCH = 'master'