aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2014-12-09 23:06:57 +0100
committerPetter Reinholdtsen <pere@hungry.com>2014-12-09 23:06:57 +0100
commit9e498fcfc82f1fc4112c49c512e258bf7d809282 (patch)
treee122a571f359a094db5566f6d70dc332e9f3d5ac
parentc9c7832be4a3207c0977e8107f1140b4e9aadf23 (diff)
Quiet down and remove unused code.
-rw-r--r--scrapersources/postliste-oep-deliverydates10
1 files changed, 3 insertions, 7 deletions
diff --git a/scrapersources/postliste-oep-deliverydates b/scrapersources/postliste-oep-deliverydates
index 97b1536..c69e106 100644
--- a/scrapersources/postliste-oep-deliverydates
+++ b/scrapersources/postliste-oep-deliverydates
@@ -15,10 +15,6 @@ import resource
import dateutil.parser
import resource
-def cpu_spent():
- usage = resource.getrusage(resource.RUSAGE_SELF)
- return getattr(usage, 'ru_utime') + getattr(usage, 'ru_stime')
-
def fetch_oep_deliverydates(url, datastorage):
html = scraperwiki.scrape(url)
root = lxml.html.fromstring(html.decode('utf-8'))
@@ -39,11 +35,11 @@ def fetch_oep_deliverydates(url, datastorage):
datastorage.append(data)
return 0
+print "Starting to fetch journal delivery dates " + str(datetime.datetime.now())
+
datastorage = []
#fetch_oep_deliverydates("http://www.oep.no/pub/faces/statistikk.jsp?reposId=3", datastorage)
# New url before 2012-11-09
fetch_oep_deliverydates("http://www.oep.no/pub/report.xhtml?reportId=3", datastorage)
-print datastorage
+#print datastorage
scraperwiki.sqlite.save(unique_keys=['agency', 'deliverydate'], data=datastorage)
-
-print "Starting to fetch journal delivery dates " + str(datetime.datetime.now())