1.1.0 • Published 8 years ago
gw2e-gw2api-scraping v1.1.0
gw2api-scraping
Scraping unofficial sites for information the API can't provide.
This is part of gw2efficiency. Please report all issues in the central repository.
Install
npm install gw2e-gw2api-scraping
This module can be used for Node.js. Theoretically it works in browsers using Browserify, but due to CORS most methods are not available.
Requires the babel-polyfill to work.
Usage
const scraping = require('gw2e-gw2api-scraping')
// Get the current offers for claim tickets from wiki.guildwars2.com
let offers = await scraping.claimTicketOffers()
// Get the dye categories (materials, sets, colors) from wiki.guildwars2.com
let categories = await scraping.dyeCategories()
// Get the minipet set names from wiki.guildwars2.com
let sets = await scraping.miniSets()
// Get the picture for an item from wiki.guildwars2.com
let itemPicture = await scraping.itemPicture('Incinerator')
// Get the current dungeon records from gw2-dungeons.net
let records = await scraping.getDungeonRecords()
// Get the current achievement leaderboard from guildwars2.com
// Note: this takes ~40 seconds because of heavy rate limiting
let leaderboard = await scraping.achievementLeaderboard()
// Get the gem price history from gw2spidy.com
let prices = await scraping.gemPriceHistory()
// Get the cost to level professions from gw2crafts.net
let cost = await scraping.craftingProfessionCost()
Tests
npm test
The tests of this module get executed against the live sites instead of mock objects, because the structure of the scraped pages could change at any time without notice.
Licence
MIT