zoukankan      html  css  js  c++  java
  • curl != casperjs ? Google Groups

    curl != casperjs ? - Google Groups

    Hello,

    This is because twitter renders the page differently for a browser the supports javascript (casperjs) versus one that does not (curl). Curl does not execute javascript, it only handles raw http requests and responses. Casperjs on the other hand is an interface to a GUI-less browser and executes events just like a browser.
    Casperjs is based on PhantomJS & QT Webkit, so it is similar to Chrome. This means you can test any evaluate commands in a Chrome javascript console first. Oddly, in the case of your example I noticed the result for twitter on Chrome was still different than Casperjs. Caserpjs could not render the inner frames that contain the tweets.
    To resolve this, you could use the mobile site, http://mobile.twitter.com/username 
    Cheers,
    Graeme
  • 相关阅读:
    销售排行榜
    视频合并的问题
    全排列的问题
    24点的游戏
    分数拆分
    竖式
    MVVM
    package
    WP8.1APP执行流程
    W
  • 原文地址:https://www.cnblogs.com/lexus/p/2486696.html
Copyright © 2011-2022 走看看