python-raindropio icon indicating copy to clipboard operation
python-raindropio copied to clipboard

Search returning no results

Open pteale opened this issue 2 years ago • 2 comments

I have a Python script which logs on to Raindrop and searches a collection and shows the results returned. It does this using the this library

As of today when I run this script the search I get search results returned, even though I know there are items in that collection.

I haven't changed any code on my side, so either the Raindrop API is not working with Search or this library that I am using is broken

Anyone else having issues with search results?

pteale avatar May 10 '23 11:05 pteale

Hi Paul, I ran into several small issues with this package and it doesn't look like Atsuo's actively working on it (see my Pull Request from last December for example).

If you can't get this to work and you're willing to try another library, I started from his work here, extended significantly to support the actions missing (particular file uploads) and released as package: https://github.com/PBorocz/raindrop-io-py.

Cheers

PBorocz avatar May 10 '23 23:05 PBorocz

I believe I found the source of this issue. By using the API directly I tested the /raindrops endpoint with and without search parameters and it seems that if your search is empty you now need to (1.) pass search= or (2.) remove the parameter altogether. example:

  1. https://api.raindrop.io/rest/v1/raindrops/{collectionId}?search= or
  2. https://api.raindrop.io/rest/v1/raindrops/{collectionId}

The code currently passes an empty search parameter as an empty list like:

  1. https://api.raindrop.io/rest/v1/raindrops/{collectionId}?search=[]

It seems the third option stopped working recently. To fix it I replaced the line here to make the request more similar to option 2 above:

if args == []:                                  
    params = {"perpage": perpage, "page": page}  
else:                                          
    params = {"search": json.dumps(args), "perpage": perpage, "page": page}  

not sure if this matches your use case exactly but hope it helps.

mko237 avatar Jun 04 '23 11:06 mko237