获取秒级时间戳与毫秒级时间戳:

import time
import datetime

t = time.time()

print (t)                       #原始时间数据
print (int(t))                  #秒级时间戳
print (int(round(t * 1000)))    #毫秒级时间戳

nowTime = lambda:int(round(t * 1000))
print (nowTime());              #毫秒级时间戳,基于lambda

print (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))   #日期格式化

判断文件夹是否存在:
>>> import os
>>> os.path.exists('d:/assist')
True
字符串过滤特殊文件夹符号:
string = re.sub("[? *:<>\/|]+","",string)
-->
import urllib3
urllib3.disable_warnings()
ssl._create_default_https_context = ssl._create_unverified_context
wb_data =requests.get(url,headers=header,verify=False)
去除ssl警告
import requests
import urllib.request
from urls import urls
from multiprocessing import Pool
from bs4 import BeautifulSoup
def hh(i):
    wb_data = requests.get(i)
    soup = BeautifulSoup(wb_data.text)
    img = soup.select('td > a > img')
    for i in img:
        response = urllib.request.urlopen(i.get('src'))
        cat_img = response.read()
        with open('C:\img\\'+str(i.get('src')).split('/')[-1],'wb') as f:
            f.write(cat_img)
if __name__ == '__main__':
    pool = Pool(processes=6)
    pool.map(hh,urls.split())
unicode 编码转换
.encode('utf-8').decode('unicode_escape')
一个神奇的网站
https://www.lfd.uci.edu/~gohlke/pythonlibs/#jupyter
https://wiki.python.org/moin/WindowsCompilers

更新pip pip install --upgrade pip
安装 pip install opencv-python opencv