From 82a02bfae556f1a5709acb43df631108587547b8 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Fri, 13 Jul 2012 14:54:10 +0200 Subject: Add test script to run scrapers locally. --- testlib/scraperwiki.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 testlib/scraperwiki.py (limited to 'testlib/scraperwiki.py') diff --git a/testlib/scraperwiki.py b/testlib/scraperwiki.py new file mode 100644 index 0000000..baf2b57 --- /dev/null +++ b/testlib/scraperwiki.py @@ -0,0 +1,12 @@ +def scrape(url): + print "Scraping %s" % url + if -1 != url.find("file://"): + f = open(url.replace("file://", ""), "r") + content = f.read() + f.close() + return content + else: + return "" + +def pdftoxml(pdfcontent, options): + return pdfcontent -- cgit v1.2.3