摘要: 报错信息如下 elasticsearch.exceptions.TransportError: TransportError(500, 'search_phase_execution_exception', 'Result window is too large, from + size must 阅读全文
posted @ 2020-06-29 18:43 阿磊小哥哥呀 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: centos安装lrzsz使用rz和sz完成文件传输 # yum -y install lrzsz // 上传文件,执行命令rz,会跳出文件选择窗口,选择好文件,点击确认即可。 # rz // 下载文件,执行命令sz # sz 阅读全文
posted @ 2020-06-28 16:33 阿磊小哥哥呀 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 第一步:安装java jdk # yum install java-1.8.0-openjdk 下载之后默认的目录为: /usr/lib/jvm/ 之后查看java的版本 java -version 这样安装的java不会造成后面启动es失败,已经踩过坑了 第二步:安装ElasticSearch c 阅读全文
posted @ 2020-06-23 15:40 阿磊小哥哥呀 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: import osimport statos.chmod(basedir, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) 阅读全文
posted @ 2020-06-16 10:53 阿磊小哥哥呀 阅读(1073) 评论(0) 推荐(0) 编辑
摘要: import os import stat import time import asyncio from pyppeteer.launcher import launch async def main(): basedir = os.path.abspath(os.path.dirname(__f 阅读全文
posted @ 2020-06-16 10:52 阿磊小哥哥呀 阅读(202) 评论(0) 推荐(0) 编辑
摘要: from bson.objectid import ObjectId 1、字符串转ObjectId oid = ObjectId(id_str); 2、ObjectId转字符串 id_str = ObjectId(id).toString() 例子 find({'_id': ObjectId(id_ 阅读全文
posted @ 2020-04-23 17:04 阿磊小哥哥呀 阅读(1374) 评论(0) 推荐(0) 编辑