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

Added a manager to allow me to use jsoup. #62

Merged
merged 1 commit into from Sep 16, 2015

Conversation

egonw
Copy link
Member

@egonw egonw commented Aug 29, 2015

Arvid, please let me know if it is in order (see email) or if it needs tweaks before you can pull it in.

An example:

htmlFilename = "/ECHA/substance.html";
dossierFolder = "http://apps.echa.europa.eu/registered/data/dossiers/";
testURL = dossierFolder + "DISS-9d8ad2a1-0d51-13f7-e044-00144f67d249/AGGR-7e14e77e-8a7d-4f8d-ab80-d0b7df6bb939_DISS-9d8ad2a1-0d51-13f7-e044-00144f67d249.html";

htmlFile = bioclipse.downloadAsFile(testURL, "text/html", htmlFilename);

doc = jsoup.parse(htmlFilename);

id = jsoup.select(doc, "#body .structuralFormula img").attr("src").split("_")[0];
name = jsoup.select(doc, "#body .name .value").text()
ecNumber = jsoup.select(doc, "#body .ecNumber .value").text()
casNumber = jsoup.select(doc, "#body .casNumber .value").text()
molecularFormula = jsoup.select(doc, "#body .molecularFormula .value").first().text()
iupacName = jsoup.select(doc, "#body .iupacName .value").text()
smiles = jsoup.select(doc, "#body .smilesNotation .value span").text()
inchi = jsoup.select(doc, "#body .inchi .value span").text()
goglepox added a commit that referenced this pull request Sep 16, 2015
Added a manager to allow me to use jsoup.
@goglepox goglepox merged commit 32706bf into bioclipse:develop Sep 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants