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

Add ability to delete highlights #5

Open
deiwin opened this issue Feb 20, 2014 · 2 comments
Open

Add ability to delete highlights #5

deiwin opened this issue Feb 20, 2014 · 2 comments

Comments

@deiwin
Copy link

deiwin commented Feb 20, 2014

Some background:

At the moment I have more than 1k highlights in Kindle that I've already imported to Anki (the reason I highlighted the words), but they are still stored by Amazon as well, which makes looking for relevant highlights difficult.

The page these highlights are scraped from has a delete button, clicking it shouldn't be too difficult.

Here's a sample HTML for the delete button:

<form action="/user_annotation_relation/delete_highlight" class="deleteHighlightForm" method="post">
  <div style="margin:0;padding:0">
    <input name="authenticity_token" type="hidden" value="[...]">
  </div>
  <input id="asin" name="asin" type="hidden" value="B002VHI8J0">
  <input id="annotation_id" name="annotation_id" type="hidden" value="[...]">
  <span class="deleteHighlight">
    <button class="textSubmit" name="delete" type="submit">
      [...] Delete this highlight [...]
    </button>
  </span>
  <span class="deleteHighlightUndo hidden">
    <button class="textSubmit" name="undo" type="submit">
      [...] Undo [...]
    </button>
  </span>
</form>

It looks like a simple POST request would do as well. No need to click the actual button. The scraper just has to record the authenticity_token, which seems to be the same for all highlights.

@parroty
Copy link
Owner

parroty commented Apr 12, 2014

Thanks for the comment, and sorry I didn't notice this issue item. I'll check your suggestion.
However, [Location] column for each highlight has link to kindle app, and it opens the location in the app which can update/delete the highlights. It does not work?

@deiwin
Copy link
Author

deiwin commented Apr 12, 2014

It might do, but I'd like to do it programmatically. I.e. my ruby script fetches, backs up and then deletes the highlights.

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