Constructor
(abstract) new BaseSvgScrapingService()
Methods
(async) _requestSvg(attrs) → {object}
Request data from an endpoint serving SVG, parse a value from it and validate against a schema
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attrs |
object | Refer to individual attrs Properties
|
- Source:
- See:
Returns:
Parsed response
- Type
- object
(static) valueFromSvgBadge(svg, valueMatcheropt) → {string}
Extract a value from SVG
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
svg |
string | SVG to parse |
||
valueMatcher |
RegExp |
<optional> |
defaultValueMatcher | RegExp to match the value we want to parse from the SVG |
Returns:
Matched value
- Type
- string