Constructor
new ModScraper(config)
Innitiazes a ModScraper instance with the given configurations.
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | The configuration object with all the links and config parameters for the scrapper. It is in the JSON file "scraperConfig.json". |
Methods
getAuraMods() → {Promise}
Queries the Aura Mods table containing all the Aura mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getKubrowMods() → {Promise}
Queries the Kubrow Mods table containing all the Kubrow mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getMeleeMods() → {Promise}
Queries the Melee Mods table containing all the Melee mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getModInformation(modURL) → {Promise}
Makes a request to the given mod URL, downloads its information table and returns an object with the information parsed.
Parameters:
Name | Type | Description |
---|---|---|
modURL |
string | The URL of the wikia page containing the mod information to parse. |
- Source:
Returns:
- Type
- Promise
getPistolMods() → {Promise}
Queries the Pistol Mods table containing all the Pistol mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getRifleMods() → {Promise}
Queries the Rifle Mods table containing all the Rifle mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getSentinelMods() → {Promise}
Queries the Sentinel Mods table containing all the Sentinel mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getShotgunMods() → {Promise}
Queries the Shotgun Mods table containing all the Shotgun mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getStanceMods() → {Promise}
Queries the Stance Mods table containing all the Stance mods and information relative to them.
- Source:
Returns:
- Type
- Promise
getWarframeMods() → {Promise}
Queries the Warframe Mods table containing all the Warframe mods and information relative to them.
- Source:
Returns:
- Type
- Promise
requestHTML(theURL) → {Promise}
Makes a GET request to the given URL to download its HTML content and returns a Promise of a result.
On successfull completion of the request the promise returns the HTML body of the HTML page. On fail, it returns a string with the error.
This method does not make multiple retries, but if an error occurs it differentiates between the error types with a best effort basis.
Parameters:
Name | Type | Description |
---|---|---|
theURL |
string | The URL of the page whose HTML content we want to download. |
- Source:
- To Do:
-
- Check if the page changed from last time before making the request.
Throws:
-
PageUnreacheableException Generic error used when the given page cannot be reached.
-
TimeoutReadException Error generated when the given wikia page takes to long to read or write a response to us. Likely means the wikia server is overloaded with work. Genereted via Timeout.
-
TimeoutConnException Error issued when our server cannot connect to the wikia server. Likely means that the wikia server is down, or that there is a connection issue on our side. Genereted via Timeout.
Returns:
- Type
- Promise