Skip to content
Snippets Groups Projects
Commit a82625d3 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

taxonomy changed html response

parent 608161ae
No related branches found
No related tags found
3 merge requests!39112.0.4 into master,!39012.0.4 merged into 12.1.x,!388taxonomy changed html response
Pipeline #6348 passed
......@@ -108,7 +108,7 @@ public class TaxonomyBackend extends CachableInterface implements IExternalServi
queryTerm = URLEncoder.encode(queryTerm, "UTF-8");
String url = "https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?lvl=0&name=" + queryTerm;
String page = getWebPageContent(url);
Pattern idPattern = Pattern.compile("<em>Taxonomy ID: </em>([0-9]+)");
Pattern idPattern = Pattern.compile("Taxonomy ID: ([0-9]+)");
Matcher matcher = idPattern.matcher(page);
if (!matcher.find()) {
logger.warn("Unknown organism: " + term);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment