xtream1101 / humblebundle-downloader

Download you Humble Bundle Library
MIT License
543 stars 63 forks source link

cookies missing #40

Closed MrSVCD closed 3 years ago

MrSVCD commented 3 years ago

Hi, I fed the script with my key (-s) and the script crashed. am I missing something?

Traceback (most recent call last):
  File "~/.local/bin/hbd", line 8, in <module>
    sys.exit(cli())
  File "~/.local/lib/python3.8/site-packages/humblebundle_downloader/cli.py", line 84, in cli
    DownloadLibrary(
  File "~/.local/lib/python3.8/site-packages/humblebundle_downloader/download_library.py", line 63, in start
    self.purchase_keys = self.purchase_keys if self.purchase_keys else self._get_purchase_keys()  # noqa: E501
  File "~/.local/lib/python3.8/site-packages/humblebundle_downloader/download_library.py", line 397, in _get_purchase_keys
    raise Exception("Unable to download user-data, cookies missing?")
Exception: Unable to download user-data, cookies missing?
MrSVCD commented 3 years ago

I solved it Here is how: If your cookie string contains a \ eg. "something\something" (witch mine did) then your string must be begin with "\" and end with \"" eg. "\"something\something\"" I hope this helps some people.

ccoenen commented 3 years ago

this should be in the readme somewhere! Thanks for sharing the explanation :-)

It should be noted that windows batch (or plain windows cmd.exe) escape the " differently, here I had to

--session-auth """whatever I found in my browser"""

so literally three double quotes on each side. The outer ones keep the string together, and the inner pair then is actually an escaped double quote (basically, on windows "" does the same what \" does in most linux shells)