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

Search returning no results #5

Open
pteale opened this issue May 10, 2023 · 2 comments
Open

Search returning no results #5

pteale opened this issue May 10, 2023 · 2 comments

Comments

@pteale
Copy link

pteale commented May 10, 2023

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?

@PBorocz
Copy link

PBorocz commented May 10, 2023

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

@mko237
Copy link

mko237 commented Jun 4, 2023

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.

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

3 participants