In 2011 & 2012 I used Perl to read the programs broadcast by the Channel 4 of the BBC, on a particular day.I analysed this using excel functions having opened a ‘workbook’ with the argument ‘(“$url_file")’.
I have tried to do this today, for the first time after at least 6 years, but found that this did not work.
The Perl below shows the problem.You can see that the web site defined for variable $fund_url is the schedule simply by using this address in a web browser.getstore fails by returning a value of 501.The code is
use strict "vars";
use LWP::Simple;
my ($epg_dir, $fund_url, $fund_item, $url_file, $store_res);
$epg_dir = "C:\\evoke-recordings\\epg_files";
if(-d $epg_dir) {
print "epg file <$epg_dir> is there\n";
} else {
print "epg file <$epg_dir> is NOT there\n";
}
$fund_url = "http://www.bbc.co.uk/radio4/programmes/schedules/fm/2015
+/10/13";
print "\nfund_url <$fund_url>\n";
$fund_item = "2015_10_13_epg";
print "\nfund_item <$fund_item>\n";
$url_file = $epg_dir . '\\' . $fund_item . ".html";
print "\nurl_file <$url_file>\n";
$store_res = getstore($fund_url, $url_file);
print "\nstore_res <$store_res>\n";
The output from this
epg file <C:\evoke-recordings\epg_files> is there
fund_url <http://www.bbc.co.uk/radio4/programmes/schedules/fm/2015/10/13>
fund_item <2015_10_13_epg>
url_file <C:\evoke-recordings\epg_files\2015_10_13_epg.html>
store_res <501>
Can any Monk explain how I can make this work again?