Share and Money Management 0.18devel
|
Share data tracker querying quotes using OnVista service. More...
Public Member Functions | |
def | getCurrent (self, request) |
Obtain information from the data provider. More... | |
def | searchURL (self, key) |
Query OnVista for a detail page. More... | |
def | getKind (self, url) |
Determinate the share kind from the given url . More... | |
Static Public Attributes | |
int | interface_version = 2 |
Version number of the interface to access and convert the data. More... | |
string | logger_name = "smm.quote.onvista" |
Name of the instance logger. More... | |
string | name = "OnVista" |
Name of the data source. More... | |
int | provider_id = 400 |
Unique provider ID. More... | |
string | dsep = "," |
Decimal separator for converting strings to decimal values. More... | |
string | tsep = "." |
Thousands separator for converting strings to decimal values. More... | |
dictionary | mandatory_attributes |
Minimum set of attributes to be extract from the OnVista webpage. More... | |
list | search_urls |
List of URLs to search a share. More... | |
REC_DateTime | |
Pre-compiled RE to extract date and time of a quote. More... | |
REC_CERT_EXCHANGE | |
Pre-compiled RE to extract the name of the exchange for certificates. More... | |
REC_ISINText = re.compile(r"^\s*ISIN:\s*$") | |
Pre-compiled RE to find the text "ISIN:". More... | |
REC_WKNText = re.compile(r"^\s*WKN:\s*$") | |
Pre-compiled RE to find the text "WKN:". More... | |
REC_WARRANT_AMOUNT | |
Pre-compiled RE to find amount and currency for Warrants. More... | |
Static Public Attributes inherited from smm.quote.base.FetchPluginBase | |
list | properties = [] |
List of supported properties. More... | |
bool | check_robotfile = True |
Check and respect the robots.txt file. More... | |
bool | active = True |
Set False to deactivate a plugin. More... | |
int | interface_version = 2 |
Version number of the interface to access and convert the data. More... | |
string | logger_name = "smm.quote.base" |
Name of the instance logger. More... | |
string | name = "Override in derivated class!" |
Name of the data source. More... | |
provider_id = None | |
Unique provider ID. More... | |
string | dsep = "," |
Decimal separator for converting strings to decimal values. More... | |
tsep = None | |
Thousands separator for converting strings to decimal values. More... | |
logger = None | |
Instance logger. More... | |
int | max_retries = 3 |
Number of retries for temporary connection errors. More... | |
tuple | user_agent |
Define an own user agent string. More... | |
Private Member Functions | |
def | _extractDetailsDesign2017 (self, stock, soup, currency) |
Extract details of fonds from the given soup. More... | |
def | _extractWarrantDetails (self, stock, soup, currency) |
def | _extractCertificateDetails (self, stock, soup) |
Extract details of certificates from the given soup. More... | |
def | _extractTime (self, stock, soup, regex=REC_DateTime) |
Extract the quotation timestamp. More... | |
Static Private Attributes | |
list | _specific_properties |
Share data tracker querying quotes using OnVista service.
|
private |
Extract details of certificates from the given soup.
stock | Share dict |
soup | A BeautifulSoup instance |
References smm.quote.base.FetchPluginBase.logger, and smm.quote.onvista.OnvistaFetchPlugin.REC_CERT_EXCHANGE.
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent().
|
private |
Extract details of fonds from the given soup.
stock | Share dict |
soup | A BeautifulSoup instance |
currency | Code of the requested currency |
References smm.quote.onvista.OnvistaFetchPlugin._extractTime(), smm.quote.base.FetchPluginBase.logger, and smm.quote.onvista.OnvistaFetchPlugin.REC_WARRANT_AMOUNT.
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent().
|
private |
Extract the quotation timestamp.
stock | Share dict |
soup | A bs4.Tag or bs4.NavigableString instance or None if nothing found in soup |
regex | Regular expression to extract data and exchange name, default is REC_DateTime. |
References smm.quote.base.FetchPluginBase.logger.
Referenced by smm.quote.onvista.OnvistaFetchPlugin._extractDetailsDesign2017(), and smm.quote.onvista.OnvistaFetchPlugin._extractWarrantDetails().
|
private |
References smm.quote.onvista.OnvistaFetchPlugin._extractTime(), smm.quote.base.FetchPluginBase.logger, and smm.quote.onvista.OnvistaFetchPlugin.REC_WARRANT_AMOUNT.
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent().
def smm.quote.onvista.OnvistaFetchPlugin.getCurrent | ( | self, | |
request | |||
) |
Obtain information from the data provider.
self | The object instance itself |
request | See example |
References smm.quote.onvista.OnvistaFetchPlugin._extractCertificateDetails(), smm.quote.onvista.OnvistaFetchPlugin._extractDetailsDesign2017(), smm.quote.onvista.OnvistaFetchPlugin._extractWarrantDetails(), smm.quote.onvista.OnvistaFetchPlugin.getKind(), smm.quote.base.FetchPluginBase.logger, smm.quote.onvista.OnvistaFetchPlugin.mandatory_attributes, smm.quote.onvista.OnvistaFetchPlugin.REC_ISINText, smm.quote.onvista.OnvistaFetchPlugin.REC_WKNText, and smm.quote.onvista.OnvistaFetchPlugin.searchURL().
def smm.quote.onvista.OnvistaFetchPlugin.getKind | ( | self, | |
url | |||
) |
Determinate the share kind from the given url
.
self | The object instance itself |
url | URL |
search
for URLs with search forms or None
for unknown URLs.References smm.quote.base.FetchPluginBase.logger.
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent(), and smm.quote.onvista.OnvistaFetchPlugin.searchURL().
def smm.quote.onvista.OnvistaFetchPlugin.searchURL | ( | self, | |
key | |||
) |
Query OnVista for a detail page.
self | The object instance itself |
key | ISIN or WKN to search (Unicode) |
None
on errorReferences smm.quote.onvista.OnvistaFetchPlugin.getKind(), smm.quote.base.FetchPluginBase.logger, and smm.quote.onvista.OnvistaFetchPlugin.search_urls.
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent().
|
staticprivate |
|
static |
Decimal separator for converting strings to decimal values.
|
static |
Version number of the interface to access and convert the data.
|
static |
Name of the instance logger.
|
static |
Minimum set of attributes to be extract from the OnVista webpage.
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent().
|
static |
Name of the data source.
Referenced by smm.objects.Share.__str__(), and smm.quote.yahoo.YahooQueryFetchPlugin.getCurrent().
|
static |
Unique provider ID.
|
static |
Pre-compiled RE to extract the name of the exchange for certificates.
Referenced by smm.quote.onvista.OnvistaFetchPlugin._extractCertificateDetails().
|
static |
Pre-compiled RE to extract date and time of a quote.
|
static |
Pre-compiled RE to find the text "ISIN:".
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent().
|
static |
Pre-compiled RE to find amount and currency for Warrants.
Referenced by smm.quote.onvista.OnvistaFetchPlugin._extractDetailsDesign2017(), and smm.quote.onvista.OnvistaFetchPlugin._extractWarrantDetails().
|
static |
Pre-compiled RE to find the text "WKN:".
Referenced by smm.quote.onvista.OnvistaFetchPlugin.getCurrent().
|
static |
List of URLs to search a share.
Element order: general (first) to most special (last).
Be aware of derivated products because the search for products could return derivated products to.
Referenced by smm.quote.onvista.OnvistaFetchPlugin.searchURL().
|
static |
Thousands separator for converting strings to decimal values.