推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
wxinchen
V2EX  ›  Python

Python 爬虫时遇到反爬请求需要带上 cookies 中的 cna, 1.这个 cna 是什么东西呢; 2.第一次请求为啥会带 cookies;

  •  
  •   wxinchen · Jun 10, 2021 · 3996 views
    This topic created in 1946 days ago, the information mentioned may be changed or developed.

    cookies: cna=RZM8GU+BTz0CAXWIWc3cpC1;

    7 replies  •  2021-06-13 01:15:58 +08:00
    huayunbin
        1
    huayunbin  
       Jun 10, 2021
    这是爬淘宝么-.-
    tiaod
        2
    tiaod  
       Jun 10, 2021
    别爬了,前段时间进去一个
    https://www.bilibili.com/read/cv11657051/
    wxinchen
        3
    wxinchen  
    OP
       Jun 10, 2021
    不是淘宝,这个 cookies 是服务端返回来的
    yaoye555
        4
    yaoye555  
       Jun 10, 2021
    阿里系的站点都会有 cna
    scukmh
        5
    scukmh  
       Jun 10, 2021
    逯某预定
    winglight2016
        6
    winglight2016  
       Jun 10, 2021
    服务端下发 cookie 还需要问为什么吗?很多用途呀,标记 session 、device id 、用户、来源等等

    你不知道怎么处理,先试试原样发回去吧
    wxinchen
        7
    wxinchen  
    OP
       Jun 13, 2021
    好像这个 cna 会过期,因为我是初学 js 逆向,所以还不知道怎么找,可能用 js hook 啥的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5744 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 09:04 · PVG 17:04 · LAX 02:04 · JFK 05:04
    ♥ Do have faith in what you're doing.