【问题标题】:How to recognize if a cookie is set by javascript or not (client-side)如何识别cookie是否由javascript设置(客户端)
【发布时间】:2014-02-18 09:46:45
【问题描述】:

我正在使用 selenium 和 python。我需要知道某个特定的 cookie 是否由 javascript 设置。有没有办法做到这一点?

【问题讨论】:

    标签: javascript python selenium web-scraping


    【解决方案1】:

    我使用https://github.com/carhartl/jquery-cookie 完美。

    读取 cookie:

    $.cookie('the_cookie'); // => "the_value"
    $.cookie('not_existing'); // => undefined
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-26
      • 1970-01-01
      • 1970-01-01
      • 2011-01-27
      • 2016-05-06
      • 2014-03-31
      • 2019-11-26
      • 2014-01-04
      相关资源
      最近更新 更多