<div class="xT X8c" data-id="1"> <a class="d-s ob" tabindex="0" target="_top" href="114095242435722376870"> <div class="l0d"> <div class="n0d"> <a class="d-s ob yTc q0d" oid="114095242435722376870" tabindex="0" target="_top" href="114095242435722376870"> <span class="VCc">Text to retrieve</span> </a> </div> </div> <div class="Z8c"></div> <div class="XEd" data-tooltip-align="b,c"></div></div><div class="xTc X8c" data-id="2"><div class="xTc X8c" data-id="3"><div class="xTc X8c" data-id="4"><div class="xTc X8c" data-id="5"><div class="xTc X8c" data-id="6"><div class="xTc X8c" data-id="7"><div class="xTc X8c" data-id="8"><div class="xTc X8c" data-id="9"><div class="xTc X8c" data-id="10">
var casper = require('casper').create();var name = [];
function getSpanTexts() { var texts = document.querySelectorAll('span.VCc'); return Array.prototype.map.call(texts, function(e) { return e.textContent; });}
casper.start('https://plus.google.com/communities/106508855808848733254/members', function() {
});
casper.then(function() { name = this.evaluate(getSpanTexts); this.echo('fonction en cours');});
casper.run(function() { // echo results in some pretty fashion this.echo(name.length + ' names found:'); this.echo(' - ' + name.join('\n - ')).exit();});.
--
CasperJS homepage & documentation: http://casperjs.org/
CasperJS @github: https://github.com/n1k0/casperjs
You received this message because you are subscribed to the Google Groups "casperjs" group.
Visit this group at http://groups.google.com/group/casperjs?hl=en.
---
You received this message because you are subscribed to the Google Groups "CasperJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to casperjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.