Thordata Docs
繁體中文
繁體中文
  • 概述
  • 代理
    • 集成教程
      • 住宅代理集成
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Hubstudio
        • Playwright
        • Puppeteer
        • Selenium
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
        • MuLogin
      • ISP代理集成
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Hubstudio
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
      • 數據中心代理集成
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Hubstudio
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
      • 無限代理集成
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Hubstudio
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
    • 住宅代理
      • 入門指南
      • 端點產生器
        • 賬密認證
        • IP白名單
          • 國家條目提取
            • 國家/地區入口節點
          • API鏈接
      • 賬戶
      • 基本查詢
      • 位置設置
        • 國家/地區
        • 城市
        • 州
      • 會話控制
      • 協議
      • 國家/地區列表
      • CDKEY生成與兌換
    • ISP代理
      • 入門指南
    • 數據中心代理
      • 入門指南
    • 無限代理伺服器
      • 端點產生器
        • 賬密認證
        • IP白名單
          • 國家條目提取
          • API鏈接
      • 賬戶
      • 國家/地區列表
  • 爬取
    • SERP API
      • 入門指南
      • 配置
      • API實驗場
      • SSL 證書
      • 發送您的第一次請求
      • 解析後的 JSON 結果
      • SERP API Google 查詢參數
      • SERP API Bing 查詢參數
  • WEB Scraper API
    • 入門指南
    • API 請求建構器
  • 免費工具
    • 谷歌擴展程序
      • 使用教程
  • 有用的链接
    • 儀表板中心
  • 常見問題
    • 產品問題
      • 我該如何選擇合適的代理套餐?
      • 如何定位特定的國家/地區?
      • 如何定位特定的城市?
      • 什麼是無限代理?
      • IP檢測結果與購買提取的地區不符?
    • 付款問題
      • 支持哪些支付方式?
      • 購買錯套餐怎麼辦?
      • 是否提供付費服務退款?
      • 付款後,收到代理餘額或激活我的帳戶需要多長時間?
  • 支持
    • 聯繫我們
Powered by GitBook
On this page

Was this helpful?

  1. 代理
  2. 集成教程
  3. 住宅代理集成

Puppeteer

PreviousPlaywrightNextSelenium

Last updated 3 months ago

Was this helpful?

什麼是Puppeteer?

是一個 JavaScript 函式庫,它提供進階 API 來透過 DevTools 協定或 WebDriver BiDi 控制 Chrome 或 Firefox。 Puppeteer 預設在無頭(無可見 UI)中運行,但可以配置為在可見(「有頭」)瀏覽器中運行。

下面為您介紹如何將Thordata與Puppeteer集成。

1

安裝Puppeteer

您必須建立 Puppeteer 項目,啟動它,然後使用 npm 和 Puppeteer 安裝 Puppeteer。

2

在Puppeteer中填入代理值

服務器: t.pr.thordata.net:9999

代理賬戶: td-customer-USERNAME

代理密碼: PASSWORD

代碼示例:

const puppeteer = require('puppeteer');
(async () => {
  const browser = await puppeteer.launch({
    headless: false,
    args: ['--proxy-server=t.pr.thordata.net:9999]  
});
  const page = await browser.newPage();
    await page.authenticate({
        username: 'td-customer-USERNAME',
        password: 'PASSWORD'
    });
    await page.goto('https://ipinfo.thordata.com');
    await page.screenshot({path: 'example.png'});
    await browser.close();
})();

查看詳細安裝教程

點擊此處
Puppeteer