File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1313
1414COOKIE_FNAME = 'imdb_cookie.txt'
1515ZIP_FNAME = 'imdb_exported_lists.zip'
16+ README_REF = 'For more info check README.md.\n ' \
17+ '[https://github.com/monk-time/imdb-backup-lists/blob/master/README.md]'
1618
1719MList = Dict [str , str ]
1820
@@ -36,7 +38,7 @@ def load_imdb_cookies():
3638 return {'id' : cookie_path .read_text ().strip ()}
3739 else :
3840 raise FileNotFoundError (f'\n \n Create a file "{ COOKIE_FNAME } " in the script directory\n '
39- 'and put your IMDb cookie inside.\n For more info see README.md. ' )
41+ f 'and put your IMDb cookie inside.\n { README_REF } ' )
4042
4143
4244def fetch_userid (cookies : dict ) -> str :
@@ -46,8 +48,8 @@ def fetch_userid(cookies: dict) -> str:
4648 m = re .search (r'ur\d+' , r .headers ['Location' ])
4749 if not m :
4850 raise Exception ("\n \n Can't log into IMDb.\n "
49- f" Make sure that your IMDb cookie in { COOKIE_FNAME } is correct.\n "
50- 'For more info see README.md. ' )
51+ f' Make sure that your IMDb cookie in { COOKIE_FNAME } is correct.\n '
52+ f' { README_REF } ' )
5153 return m .group ()
5254
5355
You can’t perform that action at this time.
0 commit comments