Skip to content

Commit 6a6c9c3

Browse files
RowStegSchreck
authored andcommittedOct 9, 2020
IMDb get user id from user profile - refs #119
1 parent 0a3e866 commit 6a6c9c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎RatS/imdb/imdb_ratings_parser.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def __init__(self, args):
1212
self.downloaded_file_name = 'ratings.csv'
1313

1414
def _get_user_id(self):
15-
return self.site.browser.find_element_by_id('main').get_attribute('data-userid')
15+
self.site.browser.get('https://www.imdb.com/profile')
16+
return self.site.browser.find_elements_by_xpath('//div[@data-userid]')[0].get_attribute('data-userid')
1617

1718
def _parse_ratings(self):
1819
self._download_ratings_csv()

0 commit comments

Comments
 (0)
Please sign in to comment.