From: maxious Date: Sun, 25 Nov 2012 06:59:00 +0000 Subject: add austrade X-Git-Url: https://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=3d654a838c2877c6c80e4d3377f570cdfd4a05c4 --- add austrade Former-commit-id: b985d969c651c9460be5e54f33e3feb8ad940a15 --- --- /dev/null +++ b/documents/scrapers/dfd7414bb0c21a0076ab559901ae0588.py @@ -1,1 +1,19 @@ +import sys,os +sys.path.insert(0, os.path.join(os.path.dirname(__file__) or '.', '../')) +import genericScrapers +import scrape +from bs4 import BeautifulSoup +#http://www.doughellmann.com/PyMOTW/abc/ +class ScraperImplementation(genericScrapers.GenericOAICDisclogScraper): + def getColumns(self,columns): + (id, date, title, description, notes) = columns + return (id, date, description, title, notes) + def getTable(self,soup): + return soup.find(class_ = "content") + +if __name__ == '__main__': + print 'Subclass:', issubclass(ScraperImplementation, genericScrapers.GenericOAICDisclogScraper) + print 'Instance:', isinstance(ScraperImplementation(), genericScrapers.GenericOAICDisclogScraper) + ScraperImplementation().doScrape() +