in reply to Re: Web Scraping on CGI Scripts?
in thread Web Scraping on CGI Scripts?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Web Scraping on CGI Scripts?
by Corion (Patriarch) on Oct 10, 2011 at 08:47 UTC | |
by fraizerangus (Sexton) on Oct 10, 2011 at 09:30 UTC | |
by Corion (Patriarch) on Oct 10, 2011 at 09:34 UTC |