URL attribute weird behavior
franaf
New Altair Community Member
Hi all, I am trying to use "Enrich data by webservice" operator. After a lot of trial and error I could approximate what I want.
The problem arises in the "URL" parameter when my attribute has spaces into it. For example, if I use the following URL:
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&;term=<%Name%>&retmax=10000
The "<%Name%>" part must be replaced by the value of the "Name" attribute, as the operator info advises.
It seems to work okay with a string containing one word ("acidosis", for example). But, when the string has several words with a space between them (e.g.: "abdominal pain"), it looks like it were using only the first one (e.g.: "abdominal", in the last example).
When I use the complete string in the adress box of a browser, it supplies the correct result.
Do you know some way to circumvent this anomaly?
Thanks a lot to all.
The problem arises in the "URL" parameter when my attribute has spaces into it. For example, if I use the following URL:
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&;term=<%Name%>&retmax=10000
The "<%Name%>" part must be replaced by the value of the "Name" attribute, as the operator info advises.
It seems to work okay with a string containing one word ("acidosis", for example). But, when the string has several words with a space between them (e.g.: "abdominal pain"), it looks like it were using only the first one (e.g.: "abdominal", in the last example).
When I use the complete string in the adress box of a browser, it supplies the correct result.
Do you know some way to circumvent this anomaly?
Thanks a lot to all.
Tagged:
0
Answers
-
Hi there,
You could try replacing spaces with '+', like this
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&;term=science[journal]+AND+breast+cancer+AND+2008[pdat]
This is quite normal behaviour in URL construction, so can apply elsewhere for web dredgers!
0 -
Like a charm! ;D
Thanks a lot!0