摘要:
# Opera'''Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 OPR/26.0.1656.60Opera/8.0 (Win 阅读全文
摘要:
# pip install opencv-python 先安装cv2库# 读取背景图片和缺口图片bg_img = cv2.imread('bg.jpg') # 背景图片tp_img = cv2.imread('tp.png') # 缺口图片# 识别图片边缘bg_edge = cv2.Canny(bg 阅读全文
摘要:
# 先获取标签,这里得到的是列表elements = await page.Jx('xpath')# 方法一:for item in elements: src = await (await item.getProperty('src')).jsonValue()# 方法二:for item in 阅读全文
摘要:
# 设置request拦截器await page.setRequestInterception(True)page.on('request',lambda req: asyncio.ensure_future(intercept_request(req)))# 设置response拦截器page.o 阅读全文
摘要:
frame = page.frames # 得到page中所有iframe对象的列表iframe = frame[0]# 如果iframe内还有iframe,则使用childFrames取出子iframe列表childiframes = iframe.childFrames# iframe对象可以定 阅读全文
摘要:
import tkintertk = tkinter.Tk()width = tk.winfo_screenwidth()height = tk.winfo_screenheight()tk.quit() 阅读全文
摘要:
from pyppeteer import launcherlauncher.DEFAULT_ARGS.remove("--enable-automation")from pyppeteer_stealth import stealthfrom pyppeteer import launch# p 阅读全文