Coder Social home page Coder Social logo

Comments (8)

rhollister avatar rhollister commented on August 15, 2024

Yes! I've looked at their API and would love to use it. The problem is that I would have to include the secret key in the extension- which wouldn't be so secret then.

I could still do so by sending all requests through my own server which then adds the secret key and passes them to Overdrive. I'd be happy to do so, but permanent hosting (not just running a box from home) of course costs money, and there's no easy way to really monetize this extension (no place for ads, Amazon affiliate links, and certainly not going to charge money).

I've made requests (officially and unofficially to contacts there) to Overdrive asking if the read and searching APIs could be open, but never heard anything back.

It would absolutely be the preferred way of doing so.

from goodreads.

troypesola avatar troypesola commented on August 15, 2024

Exactly my conclusion as well.

I love your extension, but at the same time I don't see the value in setting up and using your own server to jump through to hide those keys.

Would be nice if Overdrive could provide a set of API keys for a sub-set of the APIs for public consumption and use. I've sent a support request into them as well.

I suppose in the meantime it may be possible to access the script values embedded in window.OverDrive.mediaItems. It looks like the JSON that is returned from the availability API call. I tested it out by pulling the search URL from your extension, loading it in a different tab and inspecting the page. The script object has attributes like isAvailable, ownedCopies, availableCopies, holdsCount.

I'd have to play with it, but seems like we'd be able to just access that object and skip parsing the dom to find the info. Just a thought.

-Troy

from goodreads.

erinco25 avatar erinco25 commented on August 15, 2024

I would be willing to donate toward hosting for this extension! I bet others would be too.

from goodreads.

troypesola avatar troypesola commented on August 15, 2024

Okay so I pulled down the code and hacked in an approach that checks for the window.OverDrive.mediaItems block and if it is found then it parses the JSON and uses the results.

Here is the background.js file with my updates.

background.txt

I'm using this with my local and it appears to be working. I will continue to test.

-Troy

from goodreads.

rhollister avatar rhollister commented on August 15, 2024

This looks great Troy. Finding window.OverDrive.mediaItems was brilliant. I'm close to pushing out an update soon!

from goodreads.

rhollister avatar rhollister commented on August 15, 2024

I've just released a new version 3.4.0 that should work. Let me know if you have any issues!

from goodreads.

troypesola avatar troypesola commented on August 15, 2024

I updated to your version and it is working for me.

Glad to help out. I was able to fill up my Kindle again. phew.

from goodreads.

rhollister avatar rhollister commented on August 15, 2024

Speaking of Kindles, I'm about to push up a script you might be interested in. It automatically "buys" free Kindle books from Amazon's free daily deals that get good reviews on Goodreads.

It will then email you a digest of purchases and skipped purchases based on keywords or categories (eg "paranormal romance fan fiction").

from goodreads.

Related Issues (20)

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.