【发布时间】:2018-05-12 00:16:52
【问题描述】:
我的数据可以在这里找到:https://paste2.org/72LmCn2P
如何从这种 JSON 中提取数据?
我可以从 Firefox 的视图中看到,Firefox 可以将此列表转换为有效的 JSON 格式。片段代码:
with urllib.request.urlopen("url") as url:
soup = BeautifulSoup(url, "html.parser")
output_file.write(str(json.loads(soup.get_text())))
如何将此类数据转换为有用的转换数据?
【问题讨论】:
标签: python json beautifulsoup