11 2021 档案

摘要:# 从这里把cookie注入到浏览器 for cookie_0 in cookie_old: driver.add_cookie(cookie_0) time.sleep(3) driver.refresh() #刷新浏览器,不然cookie不生效 # 获取cookie,这里获取到的cookie是一 阅读全文
posted @ 2021-11-16 17:30 乔儿 阅读(287) 评论(0) 推荐(0) 编辑
摘要:原因是selenium找不到浏览器(注意,这里是浏览器的路径,不是webdriver的路径),所以需要指定一下浏览器的路径,具体操作如下: from selenium import webdriver url = 'https://www.baidu.com'options = webdriver. 阅读全文
posted @ 2021-11-09 21:23 乔儿 阅读(2834) 评论(0) 推荐(0) 编辑
摘要:import time# 格林威治时间格式化struct_time = time.strptime('Sun Feb 16 11:56:25 +0800 2020', '%a %b %d %H:%M:%S %z %Y')times = time.strftime('%Y-%m-%d %H:%M:%S 阅读全文
posted @ 2021-11-08 17:49 乔儿 阅读(320) 评论(0) 推荐(0) 编辑
摘要:import os command = 'ps -ef | grep "check_cookie.py" | grep -v grep | wc -l' res = os.popen(command).readline().strip() 阅读全文
posted @ 2021-11-03 11:24 乔儿 阅读(585) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示