<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # class:browserfetcher ### class: BrowserFetcher v0.9.0 BrowserFetcher 可以用來下載和管理不同版本的 Chromium。 BrowserFetcher 操作一個修訂版本字符串,修訂版本字符串指定了一個 Chromium 的確定版本,例如 `"533271"`。修訂版本字符串可以從 [omahaproxy.appspot.com](http://omahaproxy.appspot.com/) 獲取。 看下面這個例子,他將告訴你如何使用 BrowserFetcher 下載一個指定版本的 Chromium: ``` const browserFetcher = puppeteer.createBrowserFetcher();const revisionInfo = await browserFetcher.download('533271');const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath}) ``` > **注意** BrowserFetcher 不適用于與共享下載目錄的其他實例同時運行。 #### Methods - [browserFetcher.canDownload(revision)](#?product=Puppeteer&version=v1.11.0&show=api-browserfetchercandownloadrevision)v0.9.0 - [browserFetcher.download(revision\[, progressCallback\])](#?product=Puppeteer&version=v1.11.0&show=api-browserfetcherdownloadrevision-progresscallback)v0.9.0 - [browserFetcher.localRevisions()](#?product=Puppeteer&version=v1.11.0&show=api-browserfetcherlocalrevisions)v0.9.0 - [browserFetcher.platform()](#?product=Puppeteer&version=v1.11.0&show=api-browserfetcherplatform)v0.9.0 - [browserFetcher.remove(revision)](#?product=Puppeteer&version=v1.11.0&show=api-browserfetcherremoverevision)v0.9.0 - [browserFetcher.revisionInfo(revision)](#?product=Puppeteer&version=v1.11.0&show=api-browserfetcherrevisioninforevision)v0.9.0 ### Methods #### browserFetcher.canDownload(revision)v0.9.0 - `revision` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 修訂版本號, 檢查其可用性 - returns: <[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise")<[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type "Boolean")>> 返回 `true` 如果該修訂版本可以從主機下載 該方法將會發起一個 HEAD 請求來檢查該修訂版本是否有效。 #### browserFetcher.download(revision\[, progressCallback\])v0.9.0 - `revision` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 下載的修訂版本。 - `progressCallback` <[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function "Function")([number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number"), [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number"))> 一個函數, 調用時將會傳入兩個參數: - `downloadedBytes` <[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number")> 多少字節已經被下載 - `totalBytes` <[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number")> 下載全部的字節數(譯者注: 也就是需要下載的文件大小) - returns: <[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise")<[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object "Object")>> Resolves with revision information when the revision is downloaded and extracted - `revision` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 該修訂版本被創建時的信息 - `folderPath` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 解壓該修訂版本的路徑 - `executablePath` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 該修訂版本的可執行文件的路徑 - `url` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> URL 該修訂版本的下載路徑 - `local` <[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type "Boolean")> 該修訂版本是否是在本地的磁盤上是可用的 該方法將會發起一個 GET 請求來從主機下載該修訂版本。 #### browserFetcher.localRevisions()v0.9.0 - returns: <[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise")<[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array "Array")<[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")>>> 一個列表, 包含所有的在本地磁盤可用的修訂版本 #### browserFetcher.platform()v0.9.0 - returns: <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 返回 `mac`, `linux`, `win32` 或 `win64` 之一。 #### browserFetcher.remove(revision)v0.9.0 - `revision` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 想要移除的修訂版本,如果指定的修訂版本還沒有被下載,該方法將拋出一個錯誤 - returns: <[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise")> Resolves when the revision has been removed. #### browserFetcher.revisionInfo(revision)v0.9.0 - `revision` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 想要獲取信息的修訂版本 - returns: <[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object "Object")> - `revision` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 該修訂版本被創建時的信息 - `folderPath` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 解壓該修訂版本的路徑 - `executablePath` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> 該修訂版本的可執行文件的路徑 - `url` <[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String")> URL 該修訂版本的下載路徑 - `local` <[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type "Boolean")> 該修訂版本是否是在本地的磁盤上是可用的 ![](images/pptr.png) puppeteer.js中文網|class:browserfetcher puppeteer.js中文文檔, puppeteer chrome, puppeteer firefox, puppeteer api 中文文檔 puppeteer.js中文網包含了Puppeteer中文文檔,最新資訊,應用案例等。Puppeteer 是一個 Node 庫,它提供了一個高級 API 來通過 DevTools 協議控制 Chromium 或 Chrome。
                  <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>

                              哎呀哎呀视频在线观看