{"id":424,"date":"2014-04-16T18:02:37","date_gmt":"2014-04-16T10:02:37","guid":{"rendered":"http:\/\/www.cnmiss.cn\/?p=424"},"modified":"2014-04-16T18:04:51","modified_gmt":"2014-04-16T10:04:51","slug":"ubuntu%e4%b8%8b%e5%ae%89%e8%a3%85-phantomjs-casperjs","status":"publish","type":"post","link":"https:\/\/www.cnmiss.cn\/?p=424","title":{"rendered":"Ubuntu \u4e0b\u5b89\u88c5 Phantomjs + Casperjs"},"content":{"rendered":"<p>Ubuntu\u4e0b\u5b89\u88c5 Phantomjs + Casperjs<\/p>\n<p>1.\u5b89\u88c5phantomjs<\/p>\n<p>\u2014-\u4e0b\u8f7d\u7a0b\u5e8f\u6587\u4ef6<\/p>\n<pre>wget https:\/\/bitbucket.org\/ariya\/phantomjs\/downloads\/phantomjs-1.9.7-linux-x86_64.tar.bz2<\/pre>\n<p>32\u4f4dubuntu\u4e0b\u8f7d\u94fe\u63a5\u662fhttps:\/\/bitbucket.org\/ariya\/phantomjs\/downloads\/phantomjs-1.9.7-linux-i686.tar.bz2\u3002<\/p>\n<p>\u2014-\u89e3\u538b\u6587\u4ef6<\/p>\n<pre>tar -xvf phantomjs-1.9.7-linux-x86_64.tar.bz2<\/pre>\n<p>\u2013\u5c06\u7a0b\u5e8f\u79fb\u5230\u4e00\u4e2a\u5408\u9002\u7684\u4f4d\u7f6e<\/p>\n<pre>sudo mv phantomjs-1.9.7-linux-x86_64 \/usr\/local\/src\/phantomjs<\/pre>\n<p>\u2014-\u521b\u5efa\u8f6f\u94fe\u63a5\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u8fd9\u6837\u53ef\u4ee5\u76f4\u63a5\u5728shell\u4e2d\u4f7f\u7528phantomjs\u547d\u4ee4<\/p>\n<pre>sudo ln -sf \/usr\/local\/src\/phantomjs\/bin\/phantomjs \/usr\/local\/bin\/phantomjs<\/pre>\n<p>\u2014-\u68c0\u67e5\u662f\u5426\u6b63\u5e38\u5de5\u4f5c<\/p>\n<pre>phantomjs \u2013version<\/pre>\n<p>\u5982\u679c\u4f60\u770b\u5230\u5f53\u524d\u7248\u672c\u53f7\uff0c\u5373\u8868\u793a\u6b63\u5e38\u5de5\u4f5c\u4e86\u3002<\/p>\n<p>2.\u5b89\u88c5Casperjs<\/p>\n<p>\u2014-\u8fdb\u5165\u4e00\u4e2a\u4f60\u60f3\u653ecasper\u7a0b\u5e8f\u7684\u76ee\u5f55<\/p>\n<pre>cd \/usr\/local\/src\/<\/pre>\n<p>\u2014-\u7528git\u4e0b\u8f7d\u6700\u65b0\u7a0b\u5e8f<\/p>\n<pre>sudo git clone git:\/\/github.com\/n1k0\/casperjs.git<\/pre>\n<p>\u5982\u679c\u4f60\u672a\u5b89\u88c5git\uff0c\u4f7f\u7528<\/p>\n<pre>sudo apt-get install git<\/pre>\n<p>\u5b89\u88c5git\u3002<\/p>\n<p>\u2014-\u521b\u5efa\u7a0b\u5e8f\u8f6f\u94fe\u63a5<\/p>\n<pre>sudo ln -sf \/usr\/local\/src\/casperjs\/bin\/casperjs \/usr\/local\/bin\/casperjs<\/pre>\n<p>\u2014-\u68c0\u67e5\u662f\u5426\u6b63\u5e38\u5de5\u4f5c<\/p>\n<pre>casperjs \u2013version<\/pre>\n<p>\u770b\u5230\u7248\u672c\u53f7\u4ee3\u7801\u4f60\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u4e86Casperjs\u3002<br \/>\n\u4ee5\u4e0a\u662f\u5b89\u88c5\u6700\u7248\u672c\u7684Casperjs\u3002<br \/>\n\u5982\u679c\u4f60\u60f3\u4e0b\u8f7d\u4ee5\u524d\u7684\u7248\u672c\uff0c\u4f60\u53ef\u4ee5\u5230https:\/\/github.com\/n1k0\/casperjs\u4e0a\u4e0b\u8f7d\u6307\u5b9a\u5206\u652f\u7248\u672c\uff0c\u7136\u540e\u50cf\u7b2c1\u6b65\u5b89\u88c5phantomjs\u4e00\u6837\u5b89\u88c5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu\u4e0b\u5b89\u88c5 Phantomjs + Casperjs 1.\u5b89\u88c5phant &hellip; <a href=\"https:\/\/www.cnmiss.cn\/?p=424\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[62,60],"class_list":["post-424","post","type-post","status-publish","format-standard","hentry","category-xxbj","tag-casperjs","tag-phantomjs"],"_links":{"self":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=424"}],"version-history":[{"count":0,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/424\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}