2016-10-27 12:06:44 +02:00
|
|
|
from __future__ import absolute_import
|
2016-12-21 13:17:53 +01:00
|
|
|
from typing import Any, Text
|
2016-10-27 12:06:44 +02:00
|
|
|
from bs4 import BeautifulSoup
|
|
|
|
|
|
|
|
|
|
|
|
class BaseParser(object):
|
|
|
|
def __init__(self, html_source):
|
2016-12-21 13:17:53 +01:00
|
|
|
# type: (Text) -> None
|
2016-12-16 02:05:10 +01:00
|
|
|
self._soup = BeautifulSoup(html_source, "lxml")
|
2016-10-27 12:06:44 +02:00
|
|
|
|
|
|
|
def extract_data(self):
|
|
|
|
# type: () -> Any
|
2017-05-24 02:39:38 +02:00
|
|
|
raise NotImplementedError()
|