Browse Source

Highland, North Ayrshire, Redbridge: updated based on changes made to planning websites

import/raw
peter@peter.uk.to 16 years ago
parent
commit
42bd542634
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      trunk/python_scrapers/Highland.cgi
  2. +1
    -1
      trunk/python_scrapers/NorthAyrshire.cgi
  3. +1
    -1
      trunk/python_scrapers/Redbridge.cgi

+ 1
- 1
trunk/python_scrapers/Highland.cgi View File

@@ -62,7 +62,7 @@ $month_h2 or no_results($year, $month, $day, "Cannot find month header");


my $month_list = $month_h2->right; my $month_list = $month_h2->right;


my $day_re = strftime('Planning Applications (?:[A-Za-z0-9 ]*?to )?%b[a-z]* ?%e[a-z]', 0, 0, 0, $day, $month-1, $year-1900);
my $day_re = qr/^Planning Applications.* $day[a-z]+$/;


my ($day_link) = $month_list->look_down( my ($day_link) = $month_list->look_down(
"_tag", "a", "_tag", "a",


+ 1
- 1
trunk/python_scrapers/NorthAyrshire.cgi View File

@@ -51,7 +51,7 @@ my $tree = HTML::TreeBuilder->new;
$tree->parse(decode_utf8(get('http://www.north-ayrshire.gov.uk/na/Home.nsf/OtherMenuPage?ReadForm&MenuType=Environment-Planning&DocDisplay=NoDoc&CatLevel=2||') or die "couldn't fetch index page")); $tree->parse(decode_utf8(get('http://www.north-ayrshire.gov.uk/na/Home.nsf/OtherMenuPage?ReadForm&MenuType=Environment-Planning&DocDisplay=NoDoc&CatLevel=2||') or die "couldn't fetch index page"));
$tree->eof; $tree->eof;


my $re = strftime('Planning Applications Received week ending %d %B %Y', 0, 0, 0, $day, $month-1, $year-1900);
my $re = strftime("Planning Applications Received week ending 0?$day %B %Y", 0, 0, 0, $day, $month-1, $year-1900);


my ($day_link) = $tree->look_down( my ($day_link) = $tree->look_down(
"_tag", "a", "_tag", "a",


+ 1
- 1
trunk/python_scrapers/Redbridge.cgi View File

@@ -65,7 +65,7 @@ my $year_tree = HTML::TreeBuilder->new;
$year_tree->parse(decode_utf8(get($year_absurl) or die "couldn't fetch day page")); $year_tree->parse(decode_utf8(get($year_absurl) or die "couldn't fetch day page"));
$year_tree->eof; $year_tree->eof;


my $day_re = strftime('Received %e[a-z]* %B %Y', 0, 0, 0, $day, $month-1, $year-1900);
my $day_re = strftime("Received 0?$day\[a-z]* %B %Y", 0, 0, 0, $day, $month-1, $year-1900);
$day_re =~ s/ +/\\s+/g; $day_re =~ s/ +/\\s+/g;
my ($pdf_link) = $year_tree->look_down( my ($pdf_link) = $year_tree->look_down(
"_tag", "a", "_tag", "a",


Loading…
Cancel
Save