Cookie会存储有关设备的哪些信息? [英] What information about device does cookie store?

查看:272
本文介绍了Cookie会存储有关设备的哪些信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用硒来收集cookie,这是一个问题:cookie是否存储有关硒的信息?

I'm using selenium to collect cookies, and here's the question: does cookies store information about selenium?

推荐答案

cookies不存储有关按照所述制品隐私上的Cookie关注,Cookie是无害的.在其基本形式中,的问题是简单的未编译文本文件帮助协调远程网站服务器和您的浏览器以显示网站提供的全部功能.这些功能可能包括轻松的自动登录和身份验证,第三方广告投放,广告管理,偏好设置,语言设置等.

As per the article Privacy Concerns on Cookies, cookies are harmless. In it's basic form, cookies are simple uncompiled text files that help coordinate the remote website servers and your browser to display the full range of features offered by the websites. These features may include hassle-free automatic logins and authentication, third party ad serving, ad management, preference settings, language settings, etc.

虽然 Cookies 本身无法挖掘或研究您的信息或搜索您的计算机,它们确实以至少两种方式存储个人信息:

While cookies by themselves cannot dig or research your information or search your computer, they do store personal information in at least two ways:

  • Form information
  • Ad tracking
  • Form information and
  • Ad tracking

此个人信息不是由Cookie本身生成的,而是由您自己输入的网站订单,注册页面,付款页面和其他在线表单生成的.

This personal information is not generated by the cookies themselves but by your own input into website order forms, registration pages, payment pages, and other online forms.

使用如下:

  • 代码块:

  • Code Block:

import pickle
import selenium.webdriver 
import time

driver = selenium.webdriver.Firefox()
driver.get("http://www.google.com")
pickle.dump( driver.get_cookies() , open(r'C:\Utility\testdata\my_cookies.pickle',"wb"))
driver.quit()
pickle_off = open(r'C:\Utility\testdata\my_cookies.pickle',"rb")
personOut = pickle.load(pickle_off)
print(list(personOut))

  • 控制台输出:

  • Console Output:

    [{'name': '1P_JAR', 'value': '2020-02-21-14', 'path': '/', 'domain': '.google.com', 'secure': True, 'httpOnly': False, 'expiry': 1584888349}, {'name': 'NID', 'value': '198=DCEMsfy3h6nZ0vpi6p3m3J-vVJpDlUBc7ItYE99kbFtr2fssl-1nVVXqF6joPREjrW-X8yxe5PnDqMNiVaVUd0NY8S_YOfksQdb-SzKSPUP5XumjlTjyTt_C8a5XSOmpUuXnOu-JCXHDe71fTe2KC-0kwb5B7_N7wSzM6Jrozqs', 'path': '/', 'domain': '.google.com', 'secure': True, 'httpOnly': True, 'expiry': 1598107549}]
    

  • 这篇关于Cookie会存储有关设备的哪些信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆