English resources @ BBC
BBC website hosts some useful resources to learn “real world” english:
A lot of people find it difficult to make phone calls in a foreign language – and that’s understandable. You can’t see the person you are talking to, their voice might be unclear, and you might find it difficult to find the right words.
I spend about 1 hour / 1.5 hours driving each day, so I decided to get all the audio files from BBC and burn a CD
First I extracted all the URIs below http://www.bbc.co.uk/worldservice/learningenglish using linkchecker, and then I coded a quick and dirty perl script to download the URIs:
#!/usr/bin/perl
use Text::CSV_XS;
use Set::Scalar;
my $filename = "/tmp/foobar";
my $domain = "www.bbc.co.uk";
my $url = "";
my $ext = "";
# Media file extensions
my $media = Set::Scalar->new('mp3', 'mp4', 'ram', 'swf');
my $csv = Text::CSV_XS->new({binary => 1, sep_char => ','});
open my $io, "< ", $filename or die "$filename: $!";
while (my $row = $csv->getline($io)) {
my @fields = @$row;
# URIs are absolute or relative to the server...
if (substr($fields[0],0,4) eq "http") {
$url = $fields[0] . "\n" ;
} else {
$url = "http://" . $domain . $fields[0] . "\n";
}
# If the URI points to a media file, print it
my $nap = $url;
if ($nap =~ /.*\.([^\.]*)$/) {
$ext = substr($1,0,3);
if ($media->has($ext)) {
print "$url\n";
}
}
}
wget -i and you wget it!
PS: sets are elegant
About this entry
You’re currently reading “English resources @ BBC,” an entry on Catarsis
- Published:
- 08.06.09 / 8pm
- Category:
- Life or Death, Society of Knowledge
No comments
Jump to comment form | comments rss [?] | trackback uri [?]