From d9a668312c152d4f64318010ec84340015d896bb Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Wed, 17 Feb 2016 00:10:30 +0100 Subject: Import to git --- wikifolio/model.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 wikifolio/model.py (limited to 'wikifolio/model.py') diff --git a/wikifolio/model.py b/wikifolio/model.py new file mode 100644 index 0000000..7315782 --- /dev/null +++ b/wikifolio/model.py @@ -0,0 +1,25 @@ +BASE_URL = "https://www.wikifolio.com/de/de/wikifolio/" + + +class Certificate: + def __init__(self, id, shortdesc, isin, trader): + self.id = id + self.name = shortdesc + self.isin = isin + self.trader = trader + + def make_url(self): + return BASE_URL + self.name + + def __repr__(self): + return "<{} id={} shortdesc=\"{}\" isin={}>".format( + self.__class__.__name__, self.id, self.name, self.isin) + + +class Comment: + def __init__(self, date, author, text, guid, link): + self.pubDate = date + self.author = author + self.description = text + self.guid = guid + self.link = link -- cgit v1.2.1