Entering edit mode
9.3 years ago
Zhilong Jia
★
2.2k
How to get the Therapeutic Uses and Pharmacology and Biochemistry inforamtion for a list of CIDs from pubchem in R or python.
examples: The CID is 3372, and the url is as following
https://pubchem.ncbi.nlm.nih.gov/compound/3372#section=Drug-and-Medication-Information
How to get the Therapeutic Uses and Pharmacology and Biochemistry section? Since the web includes javascript, function htmlParse in package XML of R does not work.
Similar question is Parsing Pubchem Compound Records, but I want to get the information from the website directly. Thank you.
Actually, the API should be
pug_view
(from you code and from the download link in pubchem). Like https://pubchem.ncbi.nlm.nih.gov/rest/pug_view/data/compound/2244/JSON. Indeed, Uses and Pharmacology section seems to be rather loosely structured. Thank you.