繁体   English   中英

无法在python中读取多个Tweet JSON文件(附加文件链接)

[英]Difficulty reading Multiple Tweet JSON file in python(attaching the link of the file)

请从给定的链接下载文件,该链接包含无法读取的json文件

我尝试了以下代码,但无法正常工作:

import json

with open('G:/analytics/ISB CBA/Residency/Residency1&2/B9MPRACT/data/python.json','r') as f:
    for line in f:
        tweet = json.loads(line)
        print("hello")

我知道StackOverflow中有很多解决方案和问题,但是我在读取此json文件时遇到的问题没有找到任何解决方案。 任何回应都是可观的。

检查是否可行:pip install simplejson

导入simplejson为json
与open('E:/Studies/ISB/python.json','r')为f:
对于f中的行:
tweet = json.loads(行)
打印推文

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM