|
|
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 |
|
|
|
10 |
def getColumnCount(self): |
|
|
11 |
return 4 |
|
|
12 |
def getColumns(self,columns): |
|
|
13 |
(id, date, title, description) = columns |
|
|
14 |
return (id, date, title, description, None) |
|
|
15 |
|
|
|
16 |
if __name__ == '__main__': |
|
|
17 |
print 'Subclass:', issubclass(ScraperImplementation, genericScrapers.GenericOAICDisclogScraper) |
|
|
18 |
print 'Instance:', isinstance(ScraperImplementation(), genericScrapers.GenericOAICDisclogScraper) |
|
|
19 |
ScraperImplementation().doScrape() |
|
|
20 |
|