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

invalid choice #41

Open
caozilu opened this issue Apr 30, 2018 · 2 comments
Open

invalid choice #41

caozilu opened this issue Apr 30, 2018 · 2 comments

Comments

@caozilu
Copy link

caozilu commented Apr 30, 2018

safaribooks: error: invalid choice: "sessionid=xxxxxxxxxxxxxxxxxxxxxx;'" (choose from 'download-epub', 'download', 'convert-to-mobi')

my input:
safaribooks -o 'C:\Users\xxx\Downloads' -c 'BrowserCookie=xxxxxxxxxxxxxxxxxxxxxxxxx; sessionid=xxxxxxxxxxxxxx;' -b 9781118026694 download

@yoko1998
Copy link

yoko1998 commented Aug 7, 2018

It seems despite what instruction says you have to use double quotes instead of single quotes or remove space before sessionid. However this anyway leads to next error, trying to understand what the issue is.
File "c:\users\qqq\appdata\local\programs\python\python36-32\lib\site-packages\safaribooks\spiders\safaribooks.py", line 91, in parse
cookies = dict(x.strip().split('=') for x in self.cookie.split(';'))
ValueError: dictionary update sequence element #2 has length 1; 2 is required

@yoko1998
Copy link

yoko1998 commented Aug 7, 2018

Well if you remove last ; it will pass that second problem and you will be able to go.

However, next thing it tries to navigate to TOC page which URL seems to be changed on safari since this parser was previousely written. (See issue #49 )

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

2 participants