Giter Club home page Giter Club logo

Comments (4)

omarroth avatar omarroth commented on June 19, 2024

Would you mind running shards update again to see if ddf8737 fixes your issue or provides any additional information? I'm not quite sure what the problem may be, since the code you provided appears to work as expected for my account.

from audible.cr.

cjemorton avatar cjemorton commented on June 19, 2024

I ran shards update.

Installing audible (0.2.4)

After entering the CAPTCHA, these are the results.

Unhandled exception: Unable to login. Invalid URI: https://www.amazon.com/ap/challenge?ie=UTF8&arb=ff1928a8-5fd2-4178-b25e-c5b4b95abd8c (Exception)
from lib/audible/src/audible.cr:250:25 in 'initialize:locale'
from lib/audible/src/audible.cr:104:5 in 'new:locale'
from run.cr:3:1 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:106:5 in 'main_user_code'
from /usr/share/crystal/src/crystal/main.cr:92:7 in 'main'
from /usr/share/crystal/src/crystal/main.cr:115:3 in 'main'
from __libc_start_main
from _start
from ???

from audible.cr.

cjemorton avatar cjemorton commented on June 19, 2024

Just ran another test.

This time I spun up a clean instance of Ubuntu on digital ocean, to try and rule out local environment.

I installed Crystal as per: https://crystal-lang.org/install/on_ubuntu/

I uploaded my yml file. & ran shards to pull down the project.

I uploaded the exact file I was using locally.

Exactly this (only with my account and password)

require "audible"

client = Audible::Client.new("MY_EMAIL", "MY_PW", locale: "us")
File.write("session.json", client.to_json)

And I get this exact response.

Unhandled exception: Unable to login. Invalid URI: https://www.amazon.ca/ap/challenge?ie=UTF8&arb=bdea0497-1244-4b99-a1d9-006ff0d44371 (Exception)
from lib/audible/src/audible.cr:250:25 in 'initialize:locale'
from lib/audible/src/audible.cr:104:5 in 'new:locale'
from run.cr:3:1 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:106:5 in 'main_user_code'
from /usr/share/crystal/src/crystal/main.cr:92:7 in 'main'
from /usr/share/crystal/src/crystal/main.cr:115:3 in 'main'
from __libc_start_main
from _start
from ???

So I don't think it's my local environment that's doing it.

I have also tried different locales.

"us", "ca" etc.

same thing.

from audible.cr.

cjemorton avatar cjemorton commented on June 19, 2024

Ok!

Figured it out...

After your commit [ddf8737] fixed the initial problem.

I stepped back for a couple days to get a clear head... (always helps ...)

When I looked at it again, EUREKA! ... I simply went to the link in the error and proved it was me, by sending a text (or email). Some 2 factor thing. It's not obvious by the error thrown. Anyways, It generated a nice sessions.json file to use.

So far, it's working great.

Thanks for your time on this!

from audible.cr.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.