Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Unable to download user-data, cookies missing? #50

Open
jmporcelg opened this issue Jan 15, 2022 · 11 comments
Open

Exception: Unable to download user-data, cookies missing? #50

jmporcelg opened this issue Jan 15, 2022 · 11 comments

Comments

@jmporcelg
Copy link

Using Python 3.10 (virtualenv), installed hbd through pip.

  • Obtained the cookie through Chrome (since it easily exposes them), copied it into the clipboard as is.
  • Copied its value (quoted)
  • Ran hbd -s $cookie -l library --progress

Got error:
Exception: Unable to download user-data, cookies missing?

Am I doing something wrong or this is just not working currently?

Please note I did a quick search (while logged into my Humble Bundle account, into Library) and I could not find the tag hbd is trying to find in the code.

   logger.debug("Library request: " + str(library_r))
        library_page = parsel.Selector(text=library_r.text)
        user_data = library_page.css('#user-home-json-data').xpath('string()').extract_first()  #i noqa: E501
        if user_data is None:
            raise Exception("Unable to download user-data, cookies missing?")
@Romanmir
Copy link

I exported the cookies from FF, converted them using curl (as in the docs), and I get the same message.

@amoskvin
Copy link

I ran into this also. The quotes in the cookie value are part of the value, so wrap it single quotes

hbd -s '"askdjasldj...asdljk"' -l library --progress

@jmporcelg
Copy link
Author

I ran into this also. The quotes in the cookie value are part of the value, so wrap it single quotes

hbd -s '"askdjasldj...asdljk"' -l library --progress

I can confirm that works, thank you. This should be addressed in the code and/or documentation fixed.

@XanderXAJ
Copy link

XanderXAJ commented Jan 15, 2022

I met the same Unable to download user-data, cookies missing? error and had the same thought to escape the quotes as above. Unfortunately, escaping didn't work for me using Python 3.10 on Windows via Powershell -- I still got the same error:

hbd -s '"coo...kie"' -l .\HumbleLibrary\ --progress
hbd -s "`"coo...kie"`" -l .\HumbleLibrary\ --progress

In the end I worked around it using an Ubuntu WSL installation that I had handy.

I'm not sure if someone more experienced with Powershell and Python on Windows would know why it didn't work for me?

@dylanmtaylor
Copy link

Wrapping the quote in single quotes worked for me

@Toylerrr
Copy link

"""KEY""" worked for me by the way

@wildcardjoker
Copy link

I had a similar issue, and it appears that the cookie value was old, and would no longer work.

In my case, I copied the data from another browser on a different computer, which had two _simpleauth_sess cookie values:
image

I chose the most recent value, pasted it into the command on another machine, and everything started magically working.

@Aviv-Galmidi
Copy link

@Toylerrr Suggested double escaping and it worked for me. I'm on windows with Python 3.10.2

hbd -s """cookie_value""" -l ...

@XanderXAJ Might want to try it as well

@XanderXAJ
Copy link

XanderXAJ commented Jan 26, 2022

@Aviv-Galmidi Sadly, that doesn't work for me in Powershell 5.1 and 7.2.1. But...

However, it does work in Command Prompt! That an easier and more accessible workaround than using WSL like I did before. 😄

@jdougan
Copy link

jdougan commented Jan 27, 2022

I tried all of the above on a Cygwin installation and it didn't work until I cleared ALL the humble bundle cookies and got a new session key from a fresh login. (I used the single quotes around the key)

@GaetanLhoest
Copy link

I encountered this issue as the cookie value I passed was false: the copy of the value of the cookie in my browser only took a part of the value.

xtream1101 pushed a commit that referenced this issue Aug 4, 2024
This incorporates discussion in Issue #50 where many users have encountered an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants