99 Star 777 Fork 263

tikazyq / crawlab

 / 详情

Crawlab 无法正常运行pyppetter

待办的
创建于  
2022-12-03 11:28

输入图片说明
Crawlab版本是0.6.0-2
麻烦作者看下 困扰了很长时间 谢谢

test.py代码是:

import asyncio, time
from pyppeteer import launch
import pyppeteer

print(pyppeteer.chromium_revision) # 查看版本号
print(pyppeteer.executablePath()) # Chromium应该在的路径

async def main():
browser = await launch(headless=True,options={'args': ['—-no-sandbox']})
page = await browser.newPage() # 打开新的标签页
await page.setViewport({'width': 1920, 'height': 1080}) # 页面大小一致
await page.goto('https://www.baidu.com') # 访问主页
await page.evaluate('''() =>{ Object.defineProperties(navigator,{ webdriver:{ get: () => false } }) }''')
page_text = await page.content() # 获取网页源码
print(page_text)
time.sleep(1)
await page.close()
asyncio.get_event_loop().run_until_complete(main()) #调用

评论 (0)

绝世尘封 创建了任务
绝世尘封 修改了描述
绝世尘封 修改了描述
展开全部操作日志

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
Go
1
https://gitee.com/tikazyq/crawlab.git
git@gitee.com:tikazyq/crawlab.git
tikazyq
crawlab
crawlab

搜索帮助