Hi perlatwork, On Saturday 01 Jan 2011 13:21:29 perl wrote: > use strict; > use warnings; > use YAML; > use HTML::Tree; > use LWP::UserAgent; > my $ua = LWP::UserAgent->new; > my $response = > $ua->get('http://www.raaga.com/channels/hindi/moviedetail.asp?mid=H002927') > ; my $content1 = $response->content; > my $tree = HTML::Tree->new(); > $tree->parse($content1); > my $article = $tree->look_down(_tag=>'form',id=>'raaga');
While using the debugger (see http://debugger.perl.org/ ; http://perl-begin.org/topics/debugging/ ) I see that: DB<14> x $article->as_HTML 0 '<form action="" id="raaga" method="get" name="raaga" onsubmit="return validate(this);"><table align="center" border="0" cellpadding="1" cellspacing="2" height="100%" width="100%"><tr><td><div id="playbtn2"><ul id="playnav2"><li id="play2-pl"><a href="" onclick="getList();return false">Play</a><li id="play2-ql"><a href="" onclick="selectQL();return false">QuickList</a><li id="play2-mr"><a href="" onclick="saveList();return false">My Raaga</a><li id="play2-dl"><a href="" onclick="addAlbum();return false">MP3 Downloads</a></ul></div><div style="padding:5px"><div class="lftFlt1" style="width:250px"><a class="black" href="" onclick="SelectAll('raaga',true);return false;">Select All</a> | <a class="black" href="" onclick="InvertSelect();return false;">Invert Selection</a></div></div></td></tr> </table> </form>' > my $table = > $article->look_down(_tag=>'table',class=>'dataTbl',width=>"450"); The only table inside $article does not contain a "dataTbl" class or a width of 450. It's possible that the HTML was changed (and the HTML of the page has some non-valid stuff in it.). > print Dump $table; > > > Can any one tell me why isn't this working ??? Next time try using the debugger. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ My Favourite FOSS - http://www.shlomifish.org/open-source/favourite/ Chuck Norris can make the statement "This statement is false" a true one. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/