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
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。