Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 Perl LWP::UserAgent 来抓取 HTML 和呈现的 JavaScript 源代码?
LWP::UserAgent 会让你在 Perl 中模拟一个浏览器,所以它会通过 HTTP 为你获取东西(html、javascript、图像、各种二进制文件等)。但它不会为您执行 Javascript。那不是它的工作。
在现实世界中,LWP::UA 是一辆送货卡车。它运送厨房设备的事实不会让 LWP::UA 为您做饭。它只是把炉子放在你的前门。