【发布时间】:2017-03-07 15:41:04
【问题描述】:
我正在尝试抓取我自己的流星反应应用程序。
但是,当我在“http://localhost:3000/export_json”上有一个简单的 json 时,它会发布:
{"greetings": "hello"}
使用 Python 3,我尝试使用 urlopen 阅读内容:
url = "http://localhost:3000/export_json"
html = urllib.request.urlopen(url)
html.read()
我得到一整页而不是 json:
b'<!DOCTYPE html>\n<html>\n<head>`\n <link rel="stylesheet" type="text/css" class="__meteor-css__" href="/merged-stylesheets.css?hash=a899d6ca37c7cf0b13ba96f881073946529354d0">\n<title>\n ThisIsMyTitle\n </title>\n\n</head>\n<body>\n\n\n\n<script type="text/javascript">__meteor_runtime_config__ = JSON.parse(decodeURIComponent ...`
这可能与 Meteor+react 的反应性有关,但我不知道如何绕过它。
【问题讨论】:
标签: python-3.x meteor