<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] 除了單元測試,某些項目可能還會用到端對端測試(由于用的少,這里就簡單列一下常用的第三方框架,感興趣的可以自行了解) 1. `CasperJS` 2. `Protractor` 3. `Nightwatch.js` 4. `TestCafe` 5. `CodeceptJS` 6. Sinon [Using Mocks for Testing in JavaScript With Jest (stackabuse.com)](https://stackabuse.com/using-mocks-for-testing-in-javascript-with-jes/#settingupjestinanodejsapplication) # HTML-parser on Node.js You can also take a look at x-ray:[https://github.com/lapwinglabs/x-ray](https://github.com/lapwinglabs/x-ray) [playwright · GitHub Topics](https://github.com/topics/playwright) If you want to build [DOM](http://en.wikipedia.org/wiki/Document_Object_Model)you can use[jsdom](https://github.com/tmpvar/jsdom). There's also [cheerio](https://github.com/MatthewMueller/cheerio), it has the [jQuery](http://jquery.com/) interface and it's a lot faster than older versions of jsdom, although these days they are similar in performance. You might wanna have a look at [htmlparser2](https://github.com/fb55/htmlparser2), which is a streaming parser, and according to its benchmark, it seems to be faster than others, and no DOM by default. It can also produce a DOM, as it is also bundled with a handler that creates a DOM. This is the parser that is used by cheerio. [parse5](https://github.com/inikulin/parse5)also looks like a good solution. It's fairly active (11 days since the last commit as of this update), WHATWG-compliant, and is used in [jsdom](https://github.com/tmpvar/jsdom),[Angular](https://github.com/angular/angular), and [Polymer](https://github.com/Polymer/polymer). And if you want to parse HTML for[web scraping](http://en.wikipedia.org/wiki/Web_scraping), you can use [YQL](http://developer.yahoo.com/yql/). There is a [node module](https://github.com/derek/node-yql) for it. YQL I think would be the best solution if your HTML is from a[static](http://en.wikipedia.org/wiki/Static_web_page)website, since you are relying on a service, not your own code and processing power. Though note that it won't work if the page is disallowed by the robot.txt of the website, YQL won't work with it. If the website you're trying to scrape is [dynamic](http://en.wikipedia.org/wiki/Dynamic_web_page) then you should be using a [headless browser](https://en.wikipedia.org/wiki/Headless_browser) like [phantomjs](http://phantomjs.org/). Also have a look at [casperjs](http://casperjs.org/), if you're considering phantomjs. And you can control casperjs from node with [SpookyJS](https://github.com/WaterfallEngineering/SpookyJS). Beside phantomjs there's [zombiejs](http://zombie.labnotes.org/). Unlike phantomjs that cannot be embedded in nodejs, zombiejs is just a node module. There's a [nettuts+ toturial](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/)for the latter solutions.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看