推荐学习书目
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
wuyoudehe
V2EX  ›  Python

网易云我的歌单怎么获取 ?

  •  
  •   wuyoudehe · Aug 22, 2017 · 3892 views
    This topic created in 3222 days ago, the information mentioned may be changed or developed.
    分析 POST 数据什么的都发现未登录请求头带了个 csrf_token,,登录后这个又莫名奇妙变成另外一个并储存在 cookie 中
    请求链接: http://music.163.com/weapi/v3/playlist/detail?csrf_token=c7e8af0fe539887defb2f22d9b9523d2 然后返回个 json 求告知这个 token 怎么解决。。谢谢
    8 replies    2017-08-23 09:26:25 +08:00
    eoo
        1
    eoo  
       Aug 23, 2017 via Android   ❤️ 1
    csrf_token 难道不是从 COOKIE 中取得?
    ysc3839
        2
    ysc3839  
       Aug 23, 2017   ❤️ 1
    好像并不需要呀,网页版的歌单,如 https://music.163.com/playlist?id=889570491 里面可以直接获取到 JSON 数据。
    skylancer
        3
    skylancer  
       Aug 23, 2017   ❤️ 1
    你点下分享歌单,然后你就懂了
    wuyoudehe
        5
    wuyoudehe  
    OP
       Aug 23, 2017
    @skylancer 确实可以,就怕 url:前面 2 数字会变
    wuyoudehe
        6
    wuyoudehe  
    OP
       Aug 23, 2017
    @crab 谢谢大神,,这么难的加密都能弄出来,,,,
    a2316155
        7
    a2316155  
       Aug 23, 2017   ❤️ 1
    之前很想爬歌单。。搞了半天找不到请求方式。。最后很蠢的用 selenium+plantomjs 抓的。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2693 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 63ms · UTC 14:15 · PVG 22:15 · LAX 07:15 · JFK 10:15
    ♥ Do have faith in what you're doing.