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

Nothing downloaded and no error message #21

Open
woopla opened this issue Mar 5, 2018 · 3 comments · May be fixed by #22
Open

Nothing downloaded and no error message #21

woopla opened this issue Mar 5, 2018 · 3 comments · May be fixed by #22

Comments

@woopla
Copy link

woopla commented Mar 5, 2018

Hello,

I'm modifying this script to work with v2.0.1 of kindle-highlights, but nothing happens. I've got a small test script, and it returns a book count of 0:

require 'kindle_highlights'
require 'htmlentities'

html = HTMLEntities.new
kindle = KindleHighlights::Client.new(email_address: ENV["AMAZON_USER"],
                                          password: ENV["AMAZON_PASS"])
@highlights = []

p kindle.books.count

kindle.books.each do |book|
    kindle.highlights_for(book.asin).each do |highlight|
        highlight["book"] = html.decode(book.title)
        highlight["highlight"] = html.decode(highlight["highlight"])
        @highlights << highlight
    end
end

p @highlights

I'm 100% that my Amazon email and password are correct. I ran the login + book count part in irb, no error is returned there.

Do you know if Amazon made further changes?

Thanks,

Clement

@speric
Copy link
Owner

speric commented Mar 5, 2018

@woopla I used the gem to fetch highlights this morning, with no issues.

Does your Kindle account show that you have highlights saved?

@woopla
Copy link
Author

woopla commented Mar 5, 2018

@speric the highlights are plentiful, yes 😸 It was actually working fine until Amazon changed their login page and you had to change your code.

There's no "debug mode that's super verbose" in your library, right? I'll look into debugging this on my end later this week.

@woopla
Copy link
Author

woopla commented Mar 6, 2018

OK, found the problem. Mechanize hits a page "Please confirm your identity". I've opened PR #22, any code feedback welcome, it's my first contrib to a Ruby project 😄

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

Successfully merging a pull request may close this issue.

2 participants