From b59a0f82ab631159919668568a05f3908ca3c288 Mon Sep 17 00:00:00 2001 From: mano3m Date: Sat, 19 Apr 2014 21:12:38 +0200 Subject: [PATCH] Add IMDB rentals list to charts This should add the IMDB rentals list to the charts and imdb automation. This is actually a nice list as you can download the movies right away instead of waiting until they release like with the rest of the imdb charts. The problem is that this does not work. And frankly I gave up. When I type this in my python command window it works: ''' from bs4 import BeautifulSoup import urllib2 data = urllib2.urlopen('http://www.imdb.com/boxoffice/rentals') html = BeautifulSoup(data) result_div = html.find('div', attrs = {'id': 'main'}) ''' Then result_div contains the list of movies. In the code from this PR result_div becomes None....?!?!?! @Ruudburger please help before I jump off my building ;) --- .../media/movie/providers/automation/imdb.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/media/movie/providers/automation/imdb.py b/couchpotato/core/media/movie/providers/automation/imdb.py index 0f2e2940..c0c2de88 100644 --- a/couchpotato/core/media/movie/providers/automation/imdb.py +++ b/couchpotato/core/media/movie/providers/automation/imdb.py @@ -104,16 +104,19 @@ class IMDBAutomation(IMDBBase): 'theater': 'http://www.imdb.com/movies-in-theaters/', 'top250': 'http://www.imdb.com/chart/top', 'boxoffice': 'http://www.imdb.com/chart/', + 'rentals': 'http://www.imdb.com/boxoffice/rentals', } chart_names = { 'theater': 'IMDB - Movies in Theaters', 'top250': 'IMDB - Top 250 Movies', 'boxoffice': 'IMDB - Box Office', + 'rentals': 'IMDB - Top DVD rentals', } chart_order = { 'theater': 2, - 'top250': 4, + 'top250': 5, 'boxoffice': 3, + 'rentals': 4, } first_table = ['boxoffice'] @@ -240,6 +243,13 @@ config = [{ 'description': 'New Movies In-Theaters chart', 'default': True, }, + { + 'name': 'automation_charts_rentals', + 'type': 'bool', + 'label': 'DVD Rentals', + 'description': 'Top DVD rentals chart', + 'default': True, + }, { 'name': 'automation_charts_top250', 'type': 'bool', @@ -282,6 +292,13 @@ config = [{ 'description': 'IMDB TOP 250 chart', 'default': False, }, + { + 'name': 'chart_display_rentals', + 'type': 'bool', + 'label': 'DVD Rentals', + 'description': 'Top DVD rentals chart', + 'default': True, + }, { 'name': 'chart_display_boxoffice', 'type': 'bool',