Преглед изворни кода

add three more scrapers

master
duncan.parkes пре 17 година
родитељ
комит
5647a709a0
4 измењених фајлова са 96 додато и 0 уклоњено
  1. +31
    -0
      CGI/Dundee.cgi
  2. +31
    -0
      CGI/Milton Keynes.cgi
  3. +31
    -0
      CGI/Northumberland.cgi
  4. +3
    -0
      python_scrapers/PublicAccessSites.csv

+ 31
- 0
CGI/Dundee.cgi Прегледај датотеку

@@ -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
CGI/Milton Keynes.cgi Прегледај датотеку

@@ -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
CGI/Northumberland.cgi Прегледај датотеку

@@ -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
python_scrapers/PublicAccessSites.csv Прегледај датотеку

@@ -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/"

Loading…
Откажи
Сачувај