diff --git a/couchpotato/core/providers/automation/imdb/__init__.py b/couchpotato/core/providers/automation/imdb/__init__.py
index 546cba97..20e4f41b 100644
--- a/couchpotato/core/providers/automation/imdb/__init__.py
+++ b/couchpotato/core/providers/automation/imdb/__init__.py
@@ -55,7 +55,14 @@ config = [{
'label': 'TOP 250',
'description': 'IMDB TOP 250 chart',
'default': True,
- },
+ },
+ {
+ 'name': 'automation_charts_boxoffice',
+ 'type': 'bool',
+ 'label': 'Box offce TOP 10',
+ 'description': 'IMDB Box office TOP 10 chart',
+ 'default': True,
+ },
],
},
],
diff --git a/couchpotato/core/providers/automation/imdb/main.py b/couchpotato/core/providers/automation/imdb/main.py
index e9d14b5a..76afb24c 100644
--- a/couchpotato/core/providers/automation/imdb/main.py
+++ b/couchpotato/core/providers/automation/imdb/main.py
@@ -70,8 +70,11 @@ class IMDBAutomation(IMDBBase):
chart_urls = {
'theater': 'http://www.imdb.com/movies-in-theaters/',
'top250': 'http://www.imdb.com/chart/top',
+ 'boxoffice': 'http://www.imdb.com/chart/',
}
+ first_table = ['boxoffice']
+
def getIMDBids(self):
movies = []
@@ -84,6 +87,14 @@ class IMDBAutomation(IMDBBase):
try:
result_div = html.find('div', attrs = {'id': 'main'})
+
+ try:
+ if url in self.first_table:
+ table = result_div.find('table')
+ result_div = table if table else result_div
+ except:
+ pass
+
imdb_ids = getImdb(str(result_div), multiple = True)
for imdb_id in imdb_ids: