Open lonelyhwy opened 3 months ago
URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.
I know. But replacing spaces with "+" cannot give you the right answer in the E-utils APIs. Why not replace it with ""(empty) ?
That might cause parsing issues for the API? If you don't have spaces between words sometimes the service returns nothing.
In main.py, the function call_api. There is a statement: url = url.replace(' ', '+') I have tried the example URL in Demonstration 1 (Dm. 1). https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&retmax=5&retmode=json&sort=relevance&term=LMP10. It seems correct(result is same as Demonstration 1)
Then if I add a between "?" and "db" in this URL, and use the call_api() function. It will be replaced like this:
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?+db=gene&retmax=5&retmode=json&sort=relevance&term=LMP10
Then the result is not the same as Demonstration 1.
So I want to know why you want to replace " " with "+"? Thanks