Skip to content

Chembl doesn't always load reliably

Ken McLeod edited this page May 31, 2019 · 2 revisions

Here is the output of fetching https://www.ebi.ac.uk/chembl/compound_report_card/CHEMBL6950/

<script id='JSON_LD' type="application/ld+json">
--
  |  
  | {
  | "inChI": "InChI=1S/C9H11N5/c10-4-5-1-2-7-6(3-5)8(11)14-9(12)13-7/h1-3H,4,10H2,(H4,11,12,13,14)",
  | "image": "https://www.ebi.ac.uk/chembl/api/data/image/CHEMBL6950.svg?engine=indigo",
  | "identifier": "CHEMBL6950",
  | "biochemicalInteraction": [
  | {
  | "@type": "BioChemEntity",
  | "url": "www.ebi.ac.uk/chembl/target_report_card/CHEMBL202/",
  | "identifier": "CHEMBL202"
  | },
  | {
  | "@type": "BioChemEntity",
  | "url": "www.ebi.ac.uk/chembl/target_report_card/CHEMBL2363/",
  | "identifier": "CHEMBL2363"
  | }
  | ],
  | "@type": "MolecularEntity",
  | "url": "https://www.ebi.ac.uk/chembl/compound_report_card/CHEMBL6950/",
  | "molecularFormula": "C9H11N5",
  | "inChIKey": "UZVZMGNVBKHJKH-UHFFFAOYSA-N",
  | "molecularWeight": 189.22,
  | "canonical_smiles": [
  | "NCc1ccc2nc(N)nc(N)c2c1"
  | ],
  | "monoisotopicMolecularWeight": 189.1014,
  | "@context": "http://schema.org"
  | }
  |  
  | </script>

Notice the @ context is at the very end. Fetch it again, and it becomes:

<script id='JSON_LD' type="application/ld+json">
--
  |  
  | {
  | "inChIKey": "UZVZMGNVBKHJKH-UHFFFAOYSA-N",
  | "@type": "MolecularEntity",
  | "@context": "http://schema.org",
  | "molecularFormula": "C9H11N5",
  | "monoisotopicMolecularWeight": 189.1014,
  | "canonical_smiles": [
  | "NCc1ccc2nc(N)nc(N)c2c1"
  | ],
  | "inChI": "InChI=1S/C9H11N5/c10-4-5-1-2-7-6(3-5)8(11)14-9(12)13-7/h1-3H,4,10H2,(H4,11,12,13,14)",
  | "url": "https://www.ebi.ac.uk/chembl/compound_report_card/CHEMBL6950/",
  | "image": "https://www.ebi.ac.uk/chembl/api/data/image/CHEMBL6950.svg?engine=indigo",
  | "identifier": "CHEMBL6950",
  | "molecularWeight": 189.22,
  | "biochemicalInteraction": [
  | {
  | "@type": "BioChemEntity",
  | "identifier": "CHEMBL202",
  | "url": "www.ebi.ac.uk/chembl/target_report_card/CHEMBL202/"
  | },
  | {
  | "@type": "BioChemEntity",
  | "identifier": "CHEMBL2363",
  | "url": "www.ebi.ac.uk/chembl/target_report_card/CHEMBL2363/"
  | }
  | ]
  | }
  |  
  | </script>

ALSO sometimes there is just no markup

No matter how many times you retrieve it, fetching https://www.ebi.ac.uk/chembl/compound_report_card/CHEMBL7034/ produces:

</script>

<!--- data sets json_ld -->

</body>