Hi Corion

Unfortunately I don't have access to the server machine itself, I'm doing it over the internet entirely. I've been using Web::Scraper which works really well with properly formatted HTML but not with CGI. I'm trying to get the URL and name of entries in the table. For example the code I've been using is:

#!/usr/bin/perl use warnings; use strict; use URI; use Web::Scraper; open FILE, ">file.txt" or die $!; # website to scrape my $urlToScrape = "http://www.molmovdb.org/cgi-bin/browse.cgi"; # prepare data my $teamsdata = scraper { # we will save the urls from the teams process "tr.cell2> A", 'urls[]' => '@href'; # we will save the team names process "tr.cell2> A", 'teams[]' => 'TEXT'; }; # scrape the data my $res = $teamsdata->scrape(URI->new($urlToScrape));

Please follow the link given in the code and open its page source for an example? best wishes Dan


In reply to Re^2: Web Scraping on CGI Scripts? by fraizerangus
in thread Web Scraping on CGI Scripts? by fraizerangus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.