[英]node.js parse a page and catch external frontend js errors
對的,這是可能的。 基本上,您需要下載頁面並在無頭瀏覽器(例如PhantomJS)中呈現它。
有人已經這樣做了: http : //npmjs.com/package/phantom-check
$ phantom-check http://example.com
Phantom is checking http://example.com
[info] [phantom] Starting...
[info] [phantom] Running suite: 2 steps
[debug] [phantom] opening url: http://example.com/, HTTP GET
[debug] [phantom] Navigation requested: url=http://example.com/, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "http://example.com/"
[debug] [phantom] Successfully injected Casper client-side utilities
Page http://example.com has no errors
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.