Describe the buglist index out of range if the cookies.txt file don't contain auth_token record
To Reproduce
Pass an empty cookies.txt file in it.
Expected behavior
I suggest making errors easier to read.
Or outputting warnings and fallback to unlogined methods.
Output
Traceback (most recent call last):
File "/venv/bin/twspace_dl", line 8, in <module>
sys.exit(main())
File "/venv/lib/python3.10/site-packages/twspace_dl/__main__.py", line 116, in main
args.func(args)
File "/venv/lib/python3.10/site-packages/twspace_dl/__main__.py", line 153, in twspace
auth_token = load_from_file(args.input_cookie_file)
File "/venv/lib/python3.10/site-packages/twspace_dl/login.py", line 9, in load_from_file
return re.findall(
IndexError: list index out of range
Describe the bug
list index out of range
if the cookies.txt file don't containauth_token
recordTo Reproduce Pass an empty cookies.txt file in it.
Expected behavior I suggest making errors easier to read. Or outputting warnings and fallback to unlogined methods.
Output