Hi!

> I have this problem with the User Agent, I want to download only the HTML
> source of the site. As I saw with strace it downloads the gifs and all
> other stuffs. Can I configure the UserAgent somehow or I should use some
> other module or what should I do?

You mean this...?

    # Make HTTP request
    ###################
    my $ua = LWP::UserAgent->new;
    my $webdoc = $ua->request(HTTP::Request->new(GET => $base_url));

    # If document exists and it is a HTML file...
    #############################################
    if ($webdoc->is_success) {
      if ($webdoc->content_type eq 'text/html') {
        my $fullhtml = $webdoc->content; # here is the HTML code of the
$base_url
      }
    }

bye, Matej

Reply via email to