Pra que complicar processando o HTML? O site atualiza esse &quot;chart&quot; a partir de um JSON:<br><a href="http://cotacoes.economia.uol.com.br/ws/asset/687/intraday?size=50&amp;callback=uolfinancecallback0&amp;page=1">http://cotacoes.economia.uol.com.br/ws/asset/687/intraday?size=50&amp;callback=uolfinancecallback0&amp;page=1</a><br clear="all">

A estrutura é:<br><br><font size="1"><span style="font-family: courier new,monospace;">uolfinancecallback0({</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  &quot;data&quot;: [</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;date&quot;: 1296149460000,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      &quot;price&quot;: 52.1,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;low&quot;: 51.96,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      &quot;high&quot;: 52.82,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;var&quot;: -0.36,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      &quot;varpct&quot;: -0.69,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;vol&quot;: 6194139.0</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    },</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">(...)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;date&quot;: 1296146520000,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      &quot;price&quot;: 52.07,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;low&quot;: 51.96,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      &quot;high&quot;: 52.82,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;var&quot;: -0.39,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      &quot;varpct&quot;: -0.74,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      &quot;vol&quot;: 5584075.0</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  ],</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  &quot;total&quot;: 265,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  &quot;lastUpdate&quot;: 1296149460000,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  &quot;type&quot;: &quot;stock&quot;,</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  &quot;timeOffSet&quot;: -7200000,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  &quot;today&quot;: 1296150408637</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">});</span><br style="font-family: courier new,monospace;"></font><br>Para processar JSON com Perl: <a href="http://search.cpan.org/~mlehmann/JSON-XS-2.3/XS.pm">http://search.cpan.org/~mlehmann/JSON-XS-2.3/XS.pm</a><br>

<br>ABS()<br><br>
<br><br><div class="gmail_quote">2011/1/27 Gabriel Andrade <span dir="ltr">&lt;<a href="mailto:gabiruh@gmail.com">gabiruh@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div class="h5"><br>
On Jan 27, 2011, at 2:11 PM, Jose Roberto Aquino wrote:<br>
<br>
&gt; Pessoal, alguém pode me ajudar na orientação de como capturar dados desse site:<br>
&gt; <a href="http://economia.uol.com.br/cotacoes/bolsas/acoes/bvsp-bovespa/vale5-sa/tabela-intraday.jhtm?size=700" target="_blank">http://economia.uol.com.br/cotacoes/bolsas/acoes/bvsp-bovespa/vale5-sa/tabela-intraday.jhtm?size=700</a><br>


&gt;<br>
&gt; Após capturar objetivo é guardá-los no mysql.<br>
<br>
</div></div>Alguém já teve mesma necessidade que a sua e fez o grande favor de disponibilizar no CPAN.<br>
E aposto que a solução pra 90% dos seus outros futuros problemas pode ser econtrada lá, excetuando-se gravidez indesejada, conjuntivite e nome sujo no SPC.<br>
<br>
<a href="http://search.cpan.org/perldoc?Finance::YahooQuote" target="_blank">http://search.cpan.org/perldoc?Finance::YahooQuote</a><br>
<br>
Dá uma olhada na subrotina getcustomquote pra poder especificar quais campos você deseja obter informação.<br>
<br>
$ curl -L <a href="http://cpanmin.us" target="_blank">cpanmin.us</a> | perl - Finance::YahooQuote<br>
$ perl -MFinance::YahooQuote=getquote -MData::Dumper=Dumper -E &#39;say Dumper getquote(qw/<a href="http://VALE5.SA/%29" target="_blank">VALE5.SA/)</a>;&#39;<br>
<div><div></div><div class="h5"><br>
<br>
=begin disclaimer<br>
   Sao Paulo Perl Mongers: <a href="http://sao-paulo.pm.org/" target="_blank">http://sao-paulo.pm.org/</a><br>
 SaoPaulo-pm mailing list: <a href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a><br>
 L&lt;<a href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a>&gt;<br>
=end disclaimer<br>
</div></div></blockquote></div><br>