This extracts subtitle links from WikiSubtitles Ajax episode links.
#!/usr/bin/perl use strict; use Web::Scraper; use URI;
my $uri = URI->new("http://wikisubtitles.net/ajax_loadShow.php?show=65&season=3"); my $scraper = scraper { process '//td[@class="idioma"][text()=~"English \(US\)"]/..//a', 'links[]' => '@href'; }; my $result = $scraper->scrape($uri);