0
我需要使用json對象解析包含javascript代碼的HTML文檔。從python的html文檔中提取javascript變量值
事情是這樣的:
<html>
<head>
</head>
<body>
<script type="text/javascript">
myJSONObject = {"name": "steve", "city": "new york"}
</script>
<p>Hello World.</p>
</body>
</html>
我怎樣才能提取與蟒蛇myJSONObject價值?
你能提取出你的.js先向? –
不,我只有html文件和裏面的JavaScript代碼。 – Shahaf