Class Scraper
Convenient base implementation with method stubs for IScraper.
public abstract class Scraper : IScraper
- Inheritance
-
Scraper
- Implements
- Derived
- Inherited Members
Constructors
Scraper(string, int)
public Scraper(string sScraperName, int nPriority = 100)
Parameters
sScraperNamestringDisplay name of this scraper implementation. Must not be
nullor empty.nPriorityint
Fields
SCRAPERPRIORITY_HIGH
High priority.
public const int SCRAPERPRIORITY_HIGH = 1000
Field Value
SCRAPERPRIORITY_LOW
Low priority.
public const int SCRAPERPRIORITY_LOW = 10
Field Value
SCRAPERPRIORITY_NORMAL
The default priority for all scrapers.
public const int SCRAPERPRIORITY_NORMAL = 100
Field Value
Properties
AllProductInfos
public ScraperProductInfo[] AllProductInfos { get; }
Property Value
ClassName
Returns the name of the class, as it was given to the constructor.
public string ClassName { get; }
Property Value
Name
Returns the name that was given to the constructor.
public string Name { get; }
Property Value
Priority
Returns the priority value that was given to the constructor.
public int Priority { get; }
Property Value
Methods
AddBankAccountProduct(string, string, string, Func<SepaIBAN, bool>)
protected ScraperProductInfo AddBankAccountProduct(string sProductName, string sIconName, string sLoginUrl, Func<SepaIBAN, bool> fnMatchIBAN)
Parameters
Returns
AddBankAccountProduct(string, string, string, string, params string[])
Add a bank account product with IBAN account numbers supported by this scraper.
protected ScraperProductInfo AddBankAccountProduct(string sProductName, string sIconName, string sLoginUrl, string sCountryCode, params string[] vsBankCodes)
Parameters
sProductNamestringThe ProductName of the bank account. Must not be
nullor an empty string. Usually this is a trivial string like "Postbank Konto".sIconNamestringThe name of the icon that shall be presented with this bank account. Must not be
nullor an empty string.sLoginUrlstringThe URL where the user usually interactively logs in, in order to access this account. This may be presented on the UI as a fallback if the screen scraper fails.
sCountryCodestringThe country code that must appear in the IBAN for this account product. Must not be
nullor an empty string.vsBankCodesstring[]A list of bank codes that must appear in the IBAN for this account product. Must not be
nullor an empty array. must be overridden.
Returns
Remarks
It is not needed to add each kind of bank account, e.g. current account, savings account, etc.. Usually a single bank account product entry is enough for all bank accounts of a bank.
AddCreditCardProduct(string, string, string, params string[])
Add a credit card product supported by this scraper.
protected ScraperProductInfo AddCreditCardProduct(string sProductName, string sIconName, string sLoginUrl, params string[] vsBinRanges)
Parameters
sProductNamestringThe ProductName of the credit card. Must not be
nullor an empty string.sIconNamestringThe name of the icon that shall be presented with this bank account. Must not be
nullor an empty string.sLoginUrlstringThe URL where the user usually interactively logs in, in order to access this account. This may be presented on the UI as a fallback if the screen scraper fails.
vsBinRangesstring[]A list of BIN ranges for the credit card product.
Returns
Remarks
The new ScraperProductInfo is created with the ScraperAccountNumberType PAN. If the screen scraper needs an IBAN instead, then this must be changed on the returned product info instance.
AddCreditCardWithIbanProduct(string, string, string, string, params string[])
protected ScraperProductInfo AddCreditCardWithIbanProduct(string sProductName, string sIconName, string sLoginUrl, string sCountryCode, params string[] vsBankCodes)
Parameters
Returns
AddProduct(ScraperProductType, ScraperAccountNumberType, string, string, string, string, string[])
protected ScraperProductInfo AddProduct(ScraperProductType nProductType, ScraperAccountNumberType nAccountNumberType, string sProductName, string sIconName, string sLoginUrl, string sCountryCode, string[] vsAccountNumberRanges)
Parameters
nProductTypeScraperProductTypenAccountNumberTypeScraperAccountNumberTypesProductNamestringsIconNamestringsLoginUrlstringsCountryCodestringvsAccountNumberRangesstring[]
Returns
AddProduct(ScraperProductType, string, string, string, Func<SepaIBAN, bool>)
protected ScraperProductInfo AddProduct(ScraperProductType nProductType, string sProductName, string sIconName, string sLoginUrl, Func<SepaIBAN, bool> fnMatchIBAN)
Parameters
nProductTypeScraperProductTypesProductNamestringsIconNamestringsLoginUrlstringfnMatchIBANFunc<SepaIBAN, bool>
Returns
CanScrape(JsonObject)
public bool CanScrape(JsonObject jsAcct)
Parameters
jsAcctJsonObject
Returns
CreateContact(JsonObject)
public IScraperContact CreateContact(JsonObject jsAcct)
Parameters
jsAcctJsonObject
Returns
GetProductInfo(JsonObject)
public ScraperProductInfo GetProductInfo(JsonObject jsAcct)
Parameters
jsAcctJsonObject
Returns
OnCreateScraperContact(SepaAccount)
No default implementation. Must be provided by the derived class.
public abstract IScraperContact OnCreateScraperContact(SepaAccount aAcct)
Parameters
aAcctSepaAccount