import asyncio import pyppeteer async def main(): browser = await pyppeteer.launch(headless=False, args=['--disable-infobars']) page = await browser.newPage() await page.setViewport({'width': 1366, 'height': 768}) await page.evaluateOnNewdocument('Object.defineProperty(navigator,"webdriver",{get:()=>undefined})') await page.goto('http://liuyan.people.com.cn/threads/list?fid=539') await page.reload() # reload() 刷新页面 await asyncio.sleep(100) asyncio.get_event_loop().run_until_complete(main())
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)