test_importarticles.py 251 B

1234567891011121314
  1. #coding:utf8
  2. import json
  3. file = "test.txt"
  4. with open(file,"r",encoding="utf8") as f:
  5. text = f.read()
  6. print(text)
  7. for item in json.loads(text,encoding="utf8"):
  8. print(item["content"])
  9. print(item["agency"])
  10. print(item["tenderee"])