Selaa lähdekoodia

add three more scrapers

import/raw
duncan.parkes 17 vuotta sitten
vanhempi
commit
6ea190542b
4 muutettua tiedostoa jossa 96 lisäystä ja 0 poistoa
  1. +31
    -0
      trunk/CGI/Dundee.cgi
  2. +31
    -0
      trunk/CGI/Milton Keynes.cgi
  3. +31
    -0
      trunk/CGI/Northumberland.cgi
  4. +3
    -0
      trunk/python_scrapers/PublicAccessSites.csv

+ 31
- 0
trunk/CGI/Dundee.cgi Näytä tiedosto

@@ -0,0 +1,31 @@
#!/usr/bin/python

# This is the parser for Dundee City Council.
# it is generated from the file CGITemplate

import cgi
import cgitb
#cgitb.enable(display=0, logdir="/tmp")


form = cgi.FieldStorage()
day = form.getfirst('day')
month = form.getfirst('month')
year = form.getfirst('year')


authority_name = "Dundee City Council"
authority_short_name = "Dundee"
base_url = "http://bwarrant.dundeecity.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)

xml = parser.getResults(day, month, year)

print "Content-Type: text/xml" # XML is following
print
print xml # print the xml

+ 31
- 0
trunk/CGI/Milton Keynes.cgi Näytä tiedosto

@@ -0,0 +1,31 @@
#!/usr/bin/python

# This is the parser for Milton Keynes Council.
# it is generated from the file CGITemplate

import cgi
import cgitb
#cgitb.enable(display=0, logdir="/tmp")


form = cgi.FieldStorage()
day = form.getfirst('day')
month = form.getfirst('month')
year = form.getfirst('year')


authority_name = "Milton Keynes Council"
authority_short_name = "Milton Keynes"
base_url = "http://publicaccess.milton-keynes.gov.uk/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)

xml = parser.getResults(day, month, year)

print "Content-Type: text/xml" # XML is following
print
print xml # print the xml

+ 31
- 0
trunk/CGI/Northumberland.cgi Näytä tiedosto

@@ -0,0 +1,31 @@
#!/usr/bin/python

# This is the parser for Northumberland County Council.
# it is generated from the file CGITemplate

import cgi
import cgitb
#cgitb.enable(display=0, logdir="/tmp")


form = cgi.FieldStorage()
day = form.getfirst('day')
month = form.getfirst('month')
year = form.getfirst('year')


authority_name = "Northumberland County Council"
authority_short_name = "Northumberland"
base_url = "http://planning.northumberland.gov.uk/publicaccess/tdc/"

import PublicAccess

parser = PublicAccess.PublicAccessParser(authority_name,
authority_short_name,
base_url)

xml = parser.getResults(day, month, year)

print "Content-Type: text/xml" # XML is following
print
print xml # print the xml

+ 3
- 0
trunk/python_scrapers/PublicAccessSites.csv Näytä tiedosto

@@ -51,3 +51,6 @@
"Torbay Council", "Torbay", "http://www.torbay.gov.uk/publicaccess/tdc/"
"South Ribble Borough Council", "South Ribble", "http://publicaccess.southribble.gov.uk/publicaccess/tdc/"
"Peterborough City Council", "Peterborough", "http://194.72.246.15/publicaccess/dc/"
"Dundee City Council", "Dundee", "http://bwarrant.dundeecity.gov.uk/publicaccess/tdc/"
"Northumberland County Council", "Northumberland", "http://planning.northumberland.gov.uk/publicaccess/tdc/"
"Milton Keynes Council", "Milton Keynes", "http://publicaccess.milton-keynes.gov.uk/tdc/"

Ladataan…
Peruuta
Tallenna