**Note:** Triple bonds in SMILES strings represented by '#' have to be URL-escaped as '%23' (e.g. the SMILES string of ethyne has to be specified as 'C%23C' instead of 'C#C' if encoded as part of a URL). Similarly, question marks, which can occur in InChI, need to be URL-escaped as %3F.
通过python的网络请求(request):```python
import requests
opsin = 'https://cactus.nci.nih.gov/chemical/structure/{0}/{1}'
ide = 'C#C' # SMILES of ethyne
ide = ide.replace('#', '%23')
rep = 'stdinchikey' # the desired output is StdInChIKey
# for more representations
"""
rep = 'smiles' # the desired output is SMILES
rep = 'stdinchi' # the desired output is StdInChI
rep = 'iupac_name' # the desired output is IUPAC name
rep = 'cas' # the desired output is CAS Registry Number
rep = 'formula' # the desired output is Chemical Formula
!!! also see in https://cactus.nci.nih.gov/chemical/structure_documentation
"""
url = opsin.format(ide, rep)
response = requests.get(url)
response.raise_for_status()
print(response.text) # InChIKey=HSFWRNGVRCDJHI-UHFFFAOYSA-N
```