简体   繁体   中英

How to extract content from source generated by javascript

I need to extract content generated with javascript from a site. 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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