Facebook
From letak_name, 1 Year ago, written in Python for S60.
Embed
Download Paste or View Raw
Hits: 87
  1. import re
  2. import requests
  3.  
  4. response = requests.get(url='https://d3fend.mitre.org/ontologies/d3fend.json')
  5. ds = response.json()
  6.  
  7.  
  8.  
  9. print(re.findall('(?<=:)[^\]]+',ds["@graph"][10]["@type"][1]))
  10.  
  11. print(re.findall('(?<=:)[^\]]+',ds["@graph"][10]["rdfs:isDefinedBy"]["@id"]))
  12.  
  13. print(re.findall('(?<=:)[^\]]+',ds["@graph"][10]["rdfs:subClassOf"][1]["@id"]))