V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
Fulminit
V2EX  ›  Python

Python3 如果抓 js 生成的 html 网页?

  •  
  •   Fulminit · 2014-08-09 16:18:56 +08:00 · 4984 次点击
    这是一个创建于 3540 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我是想抓super-ping.com的网页。
    比如说 http://www.super-ping.com/?ping=youtube.com&locale=en

    加载网页时需要过一会儿 "ping ..." 才会变成所需的内容。

    这时应该如何处理?
    9 条回复    2014-08-13 13:02:53 +08:00
    pimin
        1
    pimin  
       2014-08-09 16:28:44 +08:00 via iPhone   ❤️ 1
    http.client
    ehs2013
        2
    ehs2013  
       2014-08-09 16:56:23 +08:00   ❤️ 1
    ehs2013
        3
    ehs2013  
       2014-08-09 16:59:30 +08:00
    节点列表见 HTML 261 行
    Fulminit
        4
    Fulminit  
    OP
       2014-08-09 17:03:01 +08:00 via Android
    @ehs2013 请问这是怎么找到的。。下次如遇相同情况应该如何处理?
    pimin
        5
    pimin  
       2014-08-09 17:07:14 +08:00 via iPhone   ❤️ 1
    @Fulminit
    抓包查看浏览器正常访问过程判断就好了
    Fulminit
        6
    Fulminit  
    OP
       2014-08-09 17:39:58 +08:00
    @ehs2013
    打开网址比如说
    http://www.super-ping.com/ping.php?node=Hong-Kong&ping=youtube.com
    进去只有网站域名一个。。
    lujjjh
        7
    lujjjh  
       2014-08-09 22:33:56 +08:00
    @Fulminit
    需要指定一下 Referer
    reverland
        8
    reverland  
       2014-08-09 22:56:17 +08:00
    拿浏览器来……

    比如https://github.com/scrapinghub/splash
    nomaka
        9
    nomaka  
       2014-08-13 13:02:53 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   944 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 21:00 · PVG 05:00 · LAX 14:00 · JFK 17:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.