ntivirikin / xeno-canto-py

Python wrapper for the xeno-canto.org API to aid in downloading and managing recordings.
MIT License
35 stars 14 forks source link

correct syntax to pass a location to xenocanto.download? #9

Closed zepadovani closed 8 months ago

zepadovani commented 1 year ago

Hi, when I have locations with more than one word, I'm not being successfull to pass them as 'params' to xenocanto.dowload.

For example... something like

params = ["loc:Manhattan"]
asyncio.run(xenocanto.download(filt=params))

works well.

But something like: params = ["loc:New", "York"] asyncio.run(xenocanto.download(filt=params))

does not. Have tried to change params to a single string "loc:New York", to ["loc:New York"], to ["loc:New\ York"], but all those options fail...

Any clues?

zepadovani commented 1 year ago

oh, sorry for the buzz....

it's: params = ["loc:\"New York\""]

thanks!

harrisonford commented 1 year ago

Unrelated but I was searching for a way to use the download function directly thanks!