博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
curl != casperjs ? - Google Groups
阅读量:6265 次
发布时间:2019-06-22

本文共 730 字,大约阅读时间需要 2 分钟。

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,  
Cheers,
Graeme

转载地址:http://ivdpa.baihongyu.com/

你可能感兴趣的文章
jquery ui datepicker 只能选今天以后的日期
查看>>
控件:Gallery --- 3.(实现图片切换)
查看>>
Struts标签---logic:Iterate使用方法
查看>>
HDOJ-1102 Constructing Roads
查看>>
两分钟彻底让你明白Android Activity生命周期(图文)!
查看>>
关于KMP算法
查看>>
当C++遇到iOS应用开发---SQLITE篇
查看>>
Lucene
查看>>
html input readonly 和 disable的区别
查看>>
html代码格式严谨
查看>>
moodle 迁移
查看>>
树线段hdu 1754 I Hate It(线段树)
查看>>
uva-297 Quadtrees
查看>>
java6枚举类型
查看>>
构造函数产生的点及原因
查看>>
对象、对象数组、JSON、JSON数组的相关操作
查看>>
lua(wax框架) 适配 64位操作系统
查看>>
css3和jquery实现的可折叠导航菜单(适合手机网页)
查看>>
POJ 1696 Space Ant(点积的应用)
查看>>
storyboard ID
查看>>