摘要: from fastapi import FastAPI import uvicorn app = FastAPI() @app.get("/") async def root(): return {"message": "Hello World"} if __name__ == '__main__' 阅读全文
posted @ 2020-06-17 17:41 阿磊小哥哥呀 阅读(6163) 评论(0) 推荐(0) 编辑
摘要: loop = asyncio.get_event_loop() get_future = asyncio.ensure_future(main(name, password, "1234")) # 相当于开启一个future main是方法 loop.run_until_complete(get_f 阅读全文
posted @ 2020-06-17 17:39 阿磊小哥哥呀 阅读(881) 评论(0) 推荐(0) 编辑
摘要: await page.setUserAgent( 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16. 阅读全文
posted @ 2020-06-17 17:38 阿磊小哥哥呀 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 首先我们打印下当前所有的iframe browser = await launch({'headless': False, 'dumpio': True, 'executablePath': basedir + r"\\local-chromium\\575458\\chrome-win32\\ch 阅读全文
posted @ 2020-06-17 17:34 阿磊小哥哥呀 阅读(510) 评论(0) 推荐(0) 编辑