|
|
1 |
import sys,os |
|
|
2 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__) or '.', '../')) |
|
|
3 |
import genericScrapers |
|
|
4 |
import scrape |
|
|
5 |
from bs4 import BeautifulSoup |
|
|
6 |
|
|
|
7 |
#http://www.doughellmann.com/PyMOTW/abc/ |
|
|
8 |
class ScraperImplementation(genericScrapers.GenericOAICDisclogScraper): |
|
|
9 |
def getTable(self,soup): |
|
|
10 |
return soup.find(id = "content_div_50269").table |
|
|
11 |
def getColumns(self,columns): |
|
|
12 |
(id, date, title, description, notes) = columns |
|
|
13 |
return (id, date, title, description, notes) |
|
|
14 |
|
|
|
15 |
if __name__ == '__main__': |
|
|
16 |
print 'Subclass:', issubclass(ScraperImplementation, genericScrapers.GenericOAICDisclogScraper) |
|
|
17 |
print 'Instance:', isinstance(ScraperImplementation(), genericScrapers.GenericOAICDisclogScraper) |
|
|
18 |
ScraperImplementation().doScrape() |
|
|
19 |
|