01 2020 档案
摘要:一个非常神奇的包可以帮助我们优雅的解析浏览器的UA,他的名字叫做user_agents pip install pyyaml ua-parser user-agents >>>ua_string='Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS
阅读全文
摘要:获取两个时间点间的随机时间&时间戳 方案一 # python2 不兼容,python3正常 import datetime,random def randomtimes(start, end, n, frmt="%Y-%m-%d"): stime = datetime.datetime.strpti
阅读全文
摘要:Elasticserch与Elasticsearch_dsl用法 Elasticsearch_dsl::https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html Elasticserch:https://elasticsea
阅读全文
摘要:# es 查询更新操作# _*_ coding: utf-8 _*_ import time import datetime import pymysql from elasticsearch import Elasticsearch from urllib3.connectionpool impo
阅读全文