久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='3jROL'><tr id='3jROL'><dt id='3jROL'><q id='3jROL'><span id='3jROL'><b id='3jROL'><form id='3jROL'><ins id='3jROL'></ins><ul id='3jROL'></ul><sub id='3jROL'></sub></form><legend id='3jROL'></legend><bdo id='3jROL'><pre id='3jROL'><center id='3jROL'></center></pre></bdo></b><th id='3jROL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3jROL'><tfoot id='3jROL'></tfoot><dl id='3jROL'><fieldset id='3jROL'></fieldset></dl></div>
<tfoot id='3jROL'></tfoot>

  1. <legend id='3jROL'><style id='3jROL'><dir id='3jROL'><q id='3jROL'></q></dir></style></legend>

    <small id='3jROL'></small><noframes id='3jROL'>

        <bdo id='3jROL'></bdo><ul id='3jROL'></ul>

      CasperJS/PhantomJS 分段錯誤

      CasperJS/PhantomJS Segmentation fault(CasperJS/PhantomJS 分段錯誤)

      <i id='EWFLf'><tr id='EWFLf'><dt id='EWFLf'><q id='EWFLf'><span id='EWFLf'><b id='EWFLf'><form id='EWFLf'><ins id='EWFLf'></ins><ul id='EWFLf'></ul><sub id='EWFLf'></sub></form><legend id='EWFLf'></legend><bdo id='EWFLf'><pre id='EWFLf'><center id='EWFLf'></center></pre></bdo></b><th id='EWFLf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EWFLf'><tfoot id='EWFLf'></tfoot><dl id='EWFLf'><fieldset id='EWFLf'></fieldset></dl></div>

      <small id='EWFLf'></small><noframes id='EWFLf'>

        <bdo id='EWFLf'></bdo><ul id='EWFLf'></ul>
        <tfoot id='EWFLf'></tfoot>
                <tbody id='EWFLf'></tbody>
              1. <legend id='EWFLf'><style id='EWFLf'><dir id='EWFLf'><q id='EWFLf'></q></dir></style></legend>
                本文介紹了CasperJS/PhantomJS 分段錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我有一個腳本可以打開鏈接數組中的 url,并且對于每個 url,它會提取該 url 中的鏈接并將新鏈接插入到數組鏈接(addLinks 函數).該代碼導致分段錯誤,并且當它調用 this.start 打開一個有效的 url(代碼的第 3 行)時會發生這種情況.是 casperjs 還是我的代碼有問題?

                另一個有趣的點是它總是在頁面標題:"之后打印OK,它已加載",而根據代碼,它們應該以相反的順序打印.你能告訴我這種奇怪行為的原因嗎?

                //只是打開頁面并打印標題功能開始(鏈接){this.echo('讓我們試試鏈接:-- '+ 鏈接 + ' -------------');this.start(鏈接,函數(){this.echo('頁面標題:' + this.getTitle());});this.echo('OK,加載完畢
                ');}功能檢查(){if (links[currentLink] && currentLink < upTo) {this.echo('--- 鏈接 ' + currentLink + ' ---');start.call(this, links[currentLink]);addLinks.call(this, links[currentLink]);當前鏈接++;this.run(檢查);} 別的 {this.echo("全部完成.");this.exit();}}casper.start().then(function() {this.echo("開始");});casper.run(檢查);

                這是我的代碼的結果:

                <上一頁>--- 鏈接 0 ---讓我們試試鏈接:-- http://yahoo.com -------------好的,已加載頁面標題:雅虎找到 111 個鏈接 http://yahoo.com找到 13 個腳本 http://yahoo.com找到 0 幀 http://yahoo.com幀源:新框架源:--- 鏈接 1 ---讓我們試試鏈接:-- http://everything.yahoo.com/-------------好的,已加載PhantomJS 崩潰了.請閱讀崩潰報告指南...分段錯誤(核心轉儲)

                解決方案

                casper.startcasper.run 只在你的 once 中使用腳本.您可以將 this.start 重命名為 this.thenOpen 并將 this.run 重命名為 this.then.

                I have a script which opens the urls in the links array and for each url it extracts the links in that url and inserts the new links to the array links(addLinks function). The code results in segmentation fault and it happens when it calls this.start to open a valid url (3rd line of the code). Is it a problem with casperjs or my code?

                Another interesting point is that it always prints 'OK, it is loaded' after the 'Page title: ' while according to the code they should be printed in reverse order. Would you please tell me the reason for this strange behaviour?

                // Just opens the page and prints the title
                function start(link) {
                    this.echo('lets try the link:--  '+ link + ' -------------');
                    this.start(link, function() {
                        this.echo('Page title: ' + this.getTitle());
                    });
                    this.echo('OK, it is loaded
                ');
                }
                
                function check() {
                    if (links[currentLink] && currentLink < upTo) {
                        this.echo('--- Link ' + currentLink + ' ---');
                        start.call(this, links[currentLink]);
                        addLinks.call(this, links[currentLink]);
                        currentLink++;
                        this.run(check);
                    } else {
                        this.echo("All done.");
                        this.exit();
                    }
                }
                casper.start().then(function() {
                    this.echo("Starting");
                });
                
                casper.run(check);
                

                Here is the result of my code:

                --- Link 0 ---
                lets try the link:--  http://yahoo.com -------------
                OK, it is loaded
                
                Page title: Yahoo
                111 links found http://yahoo.com
                13 scripts found http://yahoo.com
                0 frames found http://yahoo.com
                 frame src:
                new frame src:
                --- Link 1 ---
                lets try the link:--  http://everything.yahoo.com/ -------------
                OK, it is loaded
                
                PhantomJS has crashed. Please read the crash reporting guide...
                Segmentation fault (core dumped)
                

                解決方案

                Use casper.start and casper.run only once in your script. You can rename this.start to this.thenOpen and this.run to this.then.

                這篇關于CasperJS/PhantomJS 分段錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                Detect FLASH plugin crashes(檢測 FLASH 插件崩潰)

                • <legend id='ozmLi'><style id='ozmLi'><dir id='ozmLi'><q id='ozmLi'></q></dir></style></legend>
                    <tfoot id='ozmLi'></tfoot>

                        <tbody id='ozmLi'></tbody>
                    1. <small id='ozmLi'></small><noframes id='ozmLi'>

                      • <bdo id='ozmLi'></bdo><ul id='ozmLi'></ul>
                        <i id='ozmLi'><tr id='ozmLi'><dt id='ozmLi'><q id='ozmLi'><span id='ozmLi'><b id='ozmLi'><form id='ozmLi'><ins id='ozmLi'></ins><ul id='ozmLi'></ul><sub id='ozmLi'></sub></form><legend id='ozmLi'></legend><bdo id='ozmLi'><pre id='ozmLi'><center id='ozmLi'></center></pre></bdo></b><th id='ozmLi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ozmLi'><tfoot id='ozmLi'></tfoot><dl id='ozmLi'><fieldset id='ozmLi'></fieldset></dl></div>

                          主站蜘蛛池模板: 国产综合精品一区二区三区 | 高清成人免费视频 | 一级片在线观看 | 国产精品久久久久久久岛一牛影视 | 久久精品亚洲国产奇米99 | 伊人精品久久久久77777 | 国产精品无 | 欧美日韩视频在线播放 | 久久久免费电影 | 天堂在线www | 一二区视频 | 久久精品一区二区三区四区 | av毛片在线免费观看 | 免费性视频 | 欧美男人天堂 | 久久成人精品一区二区三区 | 日韩av免费在线电影 | 99福利视频 | 国产免费拔擦拔擦8x高清 | 国产成人小视频 | 日韩精品在线免费观看视频 | 精品综合网 | 精品欧美一区二区在线观看欧美熟 | 日日干天天干 | 9久9久 | 亚洲精品一区av在线播放 | 岛国av在线免费观看 | 久久国产成人午夜av影院武则天 | 怡红院免费的全部视频 | 国产一级免费在线观看 | 女同久久另类99精品国产 | 精品网站999www | 久久精彩视频 | 日韩精品在线播放 | 久久久久国产精品一区 | 中文字幕在线视频一区二区三区 | 播放一级毛片 | 二区国产 | 蜜桃视频在线观看www社区 | 一级毛片在线播放 | 国产精品成人一区二区 |