V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
chendajun
V2EX  ›  Python

怎么抓取今日头条视频( http://www.toutiao.com/video/),用 firebug 可以找到视频的 URL,但找不到 URL 拼接规律。

  •  
  •   chendajun · Oct 13, 2016 · 8361 views
    This topic created in 3489 days ago, the information mentioned may be changed or developed.
    12 replies    2018-03-28 13:54:49 +08:00
    jzp113
        1
    jzp113  
       Oct 13, 2016
    chendajun
        2
    chendajun  
    OP
       Oct 13, 2016
    @jzp113 非常感谢!!!
    wang9571
        3
    wang9571  
       Oct 13, 2016
    @jzp113 厉害, V 站里的头条员工看到之后应该会改规则吧。还是要请教一下, r 、 s 取值需要使用 crc32 校验这一步是如何判断的啊?
    jzp113
        4
    jzp113  
       Oct 13, 2016
    @wang9571 分析 js
    chendajun
        5
    chendajun  
    OP
       Oct 13, 2016
    @jzp113 r 值是 17 位,估计有一定的规则生成。
    @wang9571 V 站里没有头条员工吧?
    wang9571
        6
    wang9571  
       Oct 13, 2016
    @jzp113 好吧,我还不会 js
    wang9571
        7
    wang9571  
       Oct 13, 2016
    @chendajun 怎么会没有,我看到好几次头条在 V 站发招聘信息了
    newhotter
        8
    newhotter  
       Oct 13, 2016   ❤️ 1
    何必分析 JS 。直接嗅探就好了( Selenium+browsermob )。。参考我的博客。
    http://www.liuhao.me/2016/09/20/selenium_browsermob_sniff_bilibili_video/
    backto17
        9
    backto17  
       Oct 13, 2016
    @newhotter 学习了!不过要是能分析出 url 规律,爬取量大时, 速度会比你这种方式快很多,所以还是有必要分析的.
    Hansah
        10
    Hansah  
       Oct 13, 2016
    maxthon 自带的嗅探器就能嗅探出来
    chendajun
        11
    chendajun  
    OP
       Oct 14, 2016
    @backto17 个人也感觉通过分析 js 拿到 URL 比较好,用模拟浏览器的方法效率不高,太粗暴,不够优雅。
    cangbaotu
        12
    cangbaotu  
       Mar 28, 2018
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2595 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 03:44 · PVG 11:44 · LAX 20:44 · JFK 23:44
    ♥ Do have faith in what you're doing.