1 Star 0 Fork 0

蔺智伟/拼多多自动化导出用户订单数据为excel

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test.js 944 Bytes
一键复制 编辑 原始数据 按行查看 历史
蔺智伟 提交于 2024-08-31 15:31 . 'puppteer自动化操作'
start()
async function start() {
const puppeteer = require('puppeteer')
const browser = await puppeteer.launch({ headless: false })
const page = await browser.newPage();
// Navigate the page to a URL.
await page.goto('https://www.baidu.com/');
// Set screen size.
await page.setViewport({width: 1080, height: 1024});
// Type into search box.
await page.locator('.devsite-search-field').fill('automate beyond recorder');
// Wait and click on first result.
await page.locator('.devsite-result-item-link').click();
// Locate the full title with a unique string.
const textSelector = await page
.locator('text/Customize and automate')
.waitHandle();
const fullTitle = await textSelector?.evaluate(el => el.textContent);
// Print the full title.
console.log('The title of this blog post is "%s".', fullTitle);
await browser.close();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xilidg/pinduoduo.git
git@gitee.com:xilidg/pinduoduo.git
xilidg
pinduoduo
拼多多自动化导出用户订单数据为excel
master

搜索帮助