Skip to content

403 script not working #174

@thatonehen

Description

@thatonehen

Describe the issue
When running kobodl user add on Python 3.13, the login step fails with a 403 Forbidden error.

To Reproduce
Steps to reproduce the behavior:

  1. open up terminal, if you havent already pip3 install kobodl
  2. run kobodl user add
  3. do the prompted steps
  4. See error

Expected behavior
uh i don't really know i was just kinda going with the flow and doing the steps, this is my first time using kobodl. but i guess i thought it... wouldnt error? idrk.

Screenshots

me@my name-Mac-mini downloads % kobodl --debug user add
Email: user@user.com
Password: 
Repeat for confirmation: 
Error: the two entered values do not match
Password: 
Repeat for confirmation: 

1. Open https://authorize.kobo.com/signin in a private/incognito window in your browser.
2. wait till the page loads (do not login!)
3. open the developer tools (use F12 in Firefox/Chrome, or right-click and choose "inspect")
4. select the console tab,
5. copy-paste the following code to the console there and then press Enter.

var newCaptchaDiv = document.createElement("div");
newCaptchaDiv.id = "new-hcaptcha-container";
var siteKey = document.getElementById('hcaptcha-container').getAttribute('data-sitekey');
document.body.replaceChildren(newCaptchaDiv);
grecaptcha.render(newCaptchaDiv.id, {
    sitekey: siteKey,
    callback: function(r) {console.log("Captcha response:");console.log(r);}
});
console.log('Click the checkbox to get the code');

A captcha should show up below the Sign-in form. Once you solve the captcha its response will be written
below the pasted code in the browser's console. Copy the response (the line below "Captcha response:")
and paste it here.  It will be very long!
Press enter after copying the captcha code...
Read captcha code from clipboard: P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.haJwZACjZXhwzmjoKG-ncGFzc2tlecUDlt7v6S_jFNNlM1rnZHHgH9ks0mZLr2nVFJFDnS6z_tlesPGjX9bq11mUj2XRALB2mV3B7QMjTZeSd4uwiNYTZTEIk58fH1ySRZ3r4c_agLv8HleOB6R3t25ae_gPkAfUQSjKHYlKqMGpfHNRxcmDtcu1zCPT4OMK4FrSr2osIhe5krEpo9T4TFrkdvBbB5F-qvn0im0gGRDyAdadX6zUfGysq6GNWmhbL-ly2WTqpKFaHbzQTRsnhBTTxpZdj84CLUjdVTyxJ68ogNylg6MX9301rfMs9d2fPeVr8zmd2BF4uA3YqFh0Jbvzs7peuMz-oWze2gv_c9c0uI2FOMShyA3ZpFUOp6iikGRNv3LIBwrPhmlflkWurb-8DufgAzXG6e9xlabO-KugHcEwZXTRRwlB0qa2Lysxmt4zylvqXtASspXir-PHhxZFaK8kN54zIUXobjvNh1Sja04qbD1qKWEU4MSP4JzX6T1uyqxwVvCWlM4_ElWQp6zzKYh5sfdjsLMcRbs-Gonl2KqkWi40gYqXvawyt2J9VjeUQnCHHD1QtJawpwC5DfD4nUzwgJtVxkwIDaiGn5a8e_HYJkVXcnwOEfmiDHqBQAE3qVD1XQHZdIDTrv2oNGzPr0WYoiO2PWB9rxZxdaFfu-ndDMB5xj4knZxRKtW-VbHOXN4ae7FVFLuSiQk4Owlq-TbiqVxWTm5VgTXAiPAwfIKwO6l-80V7rjlKz9clQIG6gGNGHWD0bYF4S-3GM42dimL8CjAytx0hfQLHJDZicgpcA2vQkKdr7Xdaio2N3idb2rN9epUouLgQBbkNYuy5TuNUHroxvCoi20QU-1QatOSjNUM7UGGIjDwp6h9XNnmIxglMp4H37JYVbSIHospAFCp763Or8_hgjNsJJgvDcpRXJNa8I7QOL5lQzyBGEUfTmMosYxFveWxdgxuQDgR52t_XNhIvy91Z2X3LQQeWgB8i4w6LR6bkbOoFfNQoZzPtr27lro0XO6Bl1yq1VvS5-Q_wA4qXMh9hUk-PyRFVTKlcVYEQhymyh--IB4liDh9S-6qhtLHfK6i31uhvS_-qSYXNOkSZe3QSFy2gNfximedae5P7unSbiGMVs8o4HyjHu8YIN4zJzW6oxtymb4VVICl7Ejsy44g-zqbR9Qr-TSir0a9ck55PYBvjXhLVqIYfB12uQXf5GGrMY4bGRRW2vVzy_IHkpiFAoQFKS6JrcqgzYmE1ZWY1MqhzaGFyZF9pZM4xrUyB._HcQp7alR4bcjmuQhS0AVmCcvbQZpEPfy7GQGL05tJk
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.13/bin/kobodl", line 7, in <module>
    sys.exit(cli())
             ~~~^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/kobodl/commands/user.py", line 78, in add
    actions.Login(user, password, captcha)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/kobodl/actions.py", line 169, in Login
    kobo.Login(user.Email, password, captcha)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/kobodl/kobo.py", line 455, in Login
    ) = self.__GetExtraLoginParameters()
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/kobodl/kobo.py", line 143, in __GetExtraLoginParameters
    response.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://authorize.kobo.com/signin?returnUrl=https://kobo.com/&wsa=Kobo&pwsav=8.11.24971&pwspid=00000000-0000-0000-0000-000000004000&pwsdid=95ee0008-0ddb-4273-b23d-c1d3a35d0ea4

Desktop (please complete the following information):

  • OS: [e.g. MacOS]
  • Install method and python version: i ran pip3 install kobodl, im on Python 3.13.7
  • Kobodl Version 0.12.0

Additional context
thanks for looking at my report btw log is at:

debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions