Class Scraper
Convenient base implementation with method stubs for IScraper.
Assembly: Subsembly.Scraper.dll
Syntax
public abstract class Scraper : IScraper
Constructors
Scraper(string, int)
Declaration
public Scraper(string sScraperName, int nPriority = 100)
Parameters
Type |
Name |
Description |
string |
sScraperName |
Display name of this scraper implementation. Must not be null or empty.
|
int |
nPriority |
|
Fields
SCRAPERPRIORITY_HIGH
Declaration
public const int SCRAPERPRIORITY_HIGH = 1000
Field Value
SCRAPERPRIORITY_LOW
Declaration
public const int SCRAPERPRIORITY_LOW = 10
Field Value
SCRAPERPRIORITY_NORMAL
The default priority for all scrapers.
Declaration
public const int SCRAPERPRIORITY_NORMAL = 100
Field Value
Properties
AllProductInfos
Declaration
public ScraperProductInfo[] AllProductInfos { get; }
Property Value
ClassName
Returns the name of the class, as it was given to the constructor.
Declaration
public string ClassName { get; }
Property Value
Name
Returns the name that was given to the constructor.
Declaration
public string Name { get; }
Property Value
Priority
Returns the priority value that was given to the constructor.
Declaration
public int Priority { get; }
Property Value
Methods
AddBankAccountProduct(string, string, string, Func<SepaIBAN, bool>)
Declaration
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.
Declaration
protected ScraperProductInfo AddBankAccountProduct(string sProductName, string sIconName, string sLoginUrl, string sCountryCode, params string[] vsBankCodes)
Parameters
Type |
Name |
Description |
string |
sProductName |
The ProductName of the bank account. Must not be
null or an empty string. Usually this is a trivial string like
"Postbank Konto".
|
string |
sIconName |
The name of the icon that shall be presented with this bank account. Must not be
null or an empty string.
|
string |
sLoginUrl |
The 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.
|
string |
sCountryCode |
The country code that must appear in the IBAN for this account product. Must not be
null or an empty string.
|
string[] |
vsBankCodes |
A list of bank codes that must appear in the IBAN for this account product. Must not be
null or an empty array.
must be overridden.
|
Returns
AddCreditCardProduct(string, string, string, params string[])
Add a credit card product supported by this scraper.
Declaration
protected ScraperProductInfo AddCreditCardProduct(string sProductName, string sIconName, string sLoginUrl, params string[] vsBinRanges)
Parameters
Type |
Name |
Description |
string |
sProductName |
The ProductName of the credit card. Must not be
null or an empty string.
|
string |
sIconName |
The name of the icon that shall be presented with this bank account. Must not be
null or an empty string.
|
string |
sLoginUrl |
The 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.
|
string[] |
vsBinRanges |
A list of BIN ranges for the credit card product.
|
Returns
AddCreditCardWithIbanProduct(string, string, string, string, params string[])
Declaration
protected ScraperProductInfo AddCreditCardWithIbanProduct(string sProductName, string sIconName, string sLoginUrl, string sCountryCode, params string[] vsBankCodes)
Parameters
Returns
AddProduct(ScraperProductType, ScraperAccountNumberType, string, string, string, string, string[])
Declaration
protected ScraperProductInfo AddProduct(ScraperProductType nProductType, ScraperAccountNumberType nAccountNumberType, string sProductName, string sIconName, string sLoginUrl, string sCountryCode, string[] vsAccountNumberRanges)
Parameters
Returns
AddProduct(ScraperProductType, string, string, string, Func<SepaIBAN, bool>)
Declaration
protected ScraperProductInfo AddProduct(ScraperProductType nProductType, string sProductName, string sIconName, string sLoginUrl, Func<SepaIBAN, bool> fnMatchIBAN)
Parameters
Returns
CanScrape(JsonObject)
Declaration
public bool CanScrape(JsonObject jsAcct)
Parameters
Returns
Declaration
public IScraperContact CreateContact(JsonObject jsAcct)
Parameters
Returns
GetProductInfo(JsonObject)
Declaration
public ScraperProductInfo GetProductInfo(JsonObject jsAcct)
Parameters
Returns
No default implementation. Must be provided by the derived class.
Declaration
public abstract IScraperContact OnCreateScraperContact(SepaAccount aAcct)
Parameters
Returns
Implements