[英]How to extract content from source generated by javascript
I need to extract content generated with javascript from a site. 我需要从网站提取使用javascript生成的内容。 I cannot extract the data considering the source because the content in the page itself looks like this: 我无法考虑来源来提取数据,因为页面本身的内容如下所示:
<script type="text/javascript" src="java1.js"></script>
<script type="text/javascript" src="java2.js"></script>
The content generated with those java1.js
and java2.js
so I need to extract the HTML source generated with these js scripts. 用那些java1.js
和java2.js
生成的内容,所以我需要提取用这些js脚本生成的HTML源。
I can extract the content manually using Firefox by selecting the contents then right click then chose "view selection source", but I am looking for an automated solution with perl, python or whatever language that would be able to do this. 我可以使用Firefox手动提取内容,方法是选择内容,然后单击鼠标右键,然后选择“视图选择源”,但是我正在寻找一种具有perl,python或任何能够执行此操作的语言的自动化解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.