HTTP-404 has asked for the wisdom of the Perl Monks concerning the following question:
I have followng code for cutting it this needed partJUNK HTML .............. <td class="ContenidoTitulo" colspan="3">Trucos de A 10 CUBA para PC < +/td> ................ MORE NEEDED HTML ................ <td class="ContenidoTexto" colspan="3"> CODIGOS<br>Some Text </td> ............. JUNK HTML
I think that following regexo should be fine#!/usr/bin/perl # Create a user agent object use LWP::UserAgent; use LWP::Simple; &surf; sub surf{ $ua = new LWP::UserAgent; $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5. +12 [en]' . $ua->agent); $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5. +12 [en]'); $req = HTTP::Request->new(GET => 'http://www.chollonet.com/trucoteca/ +truco.php?idjuego=598&plataforma=4'); #get rid if html @html=$ua->request($req)->as_string; print "@html"; }
but how would i use it my script thnx a lot/^<td class="ContenidoTitulo" colspan="3">Trucos de A 10 CUBA para P +C </td>(*.)<td class="ContenidoTexto" colspan="3"> CODIGOS<br>Some Te +xt </td>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cutting big HTML file
by !me (Acolyte) on Jul 29, 2001 at 05:03 UTC | |
|
Re: Cutting big HTML file
by andye (Curate) on Jul 29, 2001 at 01:59 UTC | |
|
Re: Cutting big HTML file
by mitd (Curate) on Jul 29, 2001 at 11:46 UTC | |
|
Re: Cutting big HTML file
by earthboundmisfit (Chaplain) on Jul 29, 2001 at 02:54 UTC |