I am trying to get the value from this function inside a <div>
. The value I want to get is "Unidos do Jaçanã", inside this html:
<div class="event-data">
<h1 class="event__title ng-binding">
Unidos do Jaçanã
<!--<a href="{{event.singleUrl}}" target="_blank"><i class="fa fa-external-link"></i></a>-->
<span class="event__subtitle ng-binding">Carnaval de Rua 2016</span>
</h1>
<!-- ngRepeat: occs in event.occurrences --><!-- ngIf: occs.inPeriod --><div class="event__occurrences ng-scope" ng-repeat="occs in event.occurrences" ng-if="occs.inPeriod">
<div class="event__venue">
<a href="http://spcultura.prefeitura.sp.gov.br/espaco/2141/" class="ng-binding">Rua Antônio César Neto, 347</a>
</div>
<div class="event__time ng-binding">Dia 6 de fevereiro de 2016 às 14:00</div><br>
<div class="event__time ng-binding">bloco de rua do tradicional bairro do jacana</div>
<!--a href="#" class="js-more-occurrences"><i class="fa fa-plus-circle"></i></a-->
</div><!-- end ngIf: occs.inPeriod --><!-- end ngRepeat: occs in event.occurrences -->
<!-- <div class="event__languages" style="margin: -10px 0 10px 0">
<h4 class="event__languages--title">{{event.terms.linguagem.length == 1 ? 'Linguagem' : 'Linguagens'}}:</h4> {{event.terms.linguagem.join(', ')}}
</div> -->
<span class="event__classification ng-binding">Livre</span>
<div class="event__price ng-binding">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-usd fa-stack-1x fa-inverse"></i>
</span>
gratuito
</div>
<!-- ngIf: event.traducaoLibras == 'Sim' && event.descricaoSonora == 'Sim' -->
<!-- ngIf: event.traducaoLibras == 'Sim' && event.descricaoSonora != 'Sim' -->
<!-- ngIf: event.traducaoLibras != 'Sim' && event.descricaoSonora == 'Sim' -->
<!-- <div ng-if="event.project.name">
<h4>projeto:</h4>
<a href="{{event.project.singleUrl}}">{{event.project.name}}</a>
</div>
<div ng-if="event.owner.name">
<h4>publicado por:</h4>
<a href="{{event.owner.singleUrl}}">{{event.owner.name}}</a>
</div> -->
<a href="http://spcultura.prefeitura.sp.gov.br/evento/23693/" target="_blank" class="event__info">Mais informações</a>
</div>
And, for that, I am using jquery cheerios module, with this code:
var cheerio = require('cheerio');
var request = require('request');
request({
method: 'GET',
url: 'http://carnavalderua.prefeitura.sp.gov.br/eventos/blocos/'
}, function(err, response, html) {
if(err) return console.error(err)
$ = cheerio.load(html)
$('h1.event__title').filter(function() {
var data = $(this)
var title = data.html()
console.log(title)
})
})
And I am getting this log:
{{event.name}}
<!--<a href="{{event.singleUrl}}" target="_blank"><i class="fa fa-external-link"></i></a>-->
<span class="event__subtitle">{{event.subTitle}}</span>
I think that the value I am looking for is inside {{event.name}}. How can I possible acess this value?
Thanks in advance.