You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 序列化逻辑
if not os.path.exists('session.txt'):
with open('session.txt','wb') as f:
import pickle
cookies = response.request.headers['cookie']
cookieDict={}
for cookie in cookies.split(';'):
key,value = cookie[0:cookie.find('=')], cookie[cookie.find('=')+1:]
cookieDict[key]=value
pickle.dump(cookieDict,f)
# 方法
def parse_user_info(self,response):
......
The text was updated successfully, but these errors were encountered:
cookie序列化的代码并没有放在'方法内部',而是跟方法同级的.它是如何被触发执行的?
The text was updated successfully, but these errors were encountered: