strip line endings from reading cookies

This commit is contained in:
perf3ct 2021-12-02 22:55:43 -08:00
parent 666c5c2122
commit d519d62c60
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -57,6 +57,7 @@ keyfile = json.loads(keyfile)
if os.path.exists(cookiefile_path): if os.path.exists(cookiefile_path):
with open(cookiefile_path, encoding="utf8", mode='r') as cookiefile: with open(cookiefile_path, encoding="utf8", mode='r') as cookiefile:
cookies = cookiefile.read() cookies = cookiefile.read()
cookies = cookies.rstrip()
else: else:
print("No cookies.txt file was found, you won't be able to download subscription courses! You can ignore ignore this if you don't plan to download a course included in a subscription plan.") print("No cookies.txt file was found, you won't be able to download subscription courses! You can ignore ignore this if you don't plan to download a course included in a subscription plan.")