22 lines
811 B
Python
22 lines
811 B
Python
|
|
#!/usr/bin/env python3
|
|||
|
|
import json
|
|||
|
|
|
|||
|
|
# 读取源数据
|
|||
|
|
with open('网页未导入数据/交通物流产业/交通物流项目案例.json', 'r', encoding='utf-8') as f:
|
|||
|
|
source_data = json.load(f)
|
|||
|
|
|
|||
|
|
# 查看第一个项目的完整内容结构
|
|||
|
|
project1 = source_data[0]
|
|||
|
|
print("项目名称:", project1['案例名称'])
|
|||
|
|
print("\n完整内容(前2000字符):")
|
|||
|
|
print(project1['项目案例内容'][:2000])
|
|||
|
|
print("\n...")
|
|||
|
|
print("\n完整内容(后1000字符):")
|
|||
|
|
print(project1['项目案例内容'][-1000:])
|
|||
|
|
|
|||
|
|
# 保存完整内容到临时文件以便分析
|
|||
|
|
with open('project1_full_content.txt', 'w', encoding='utf-8') as f:
|
|||
|
|
f.write(project1['项目案例内容'])
|
|||
|
|
|
|||
|
|
print("\n\n完整内容已保存到 project1_full_content.txt")
|
|||
|
|
print("内容总长度:", len(project1['项目案例内容']), "字符")
|