1.0.7 • Published 3 years ago
@lv00/scrapper_lib v1.0.7
scrapper_lib
scrapper_lib is a library to help you to scrap price from various website
Website suported
- https://www.topachat.com
- https://www.ldlc.com
- https://www.reichelt.com
- https://www.mediamarkt.be/
- https://www.amazon.*/
- https://www.boulanger.com
- https://www.dreamland.be
Install
npm install --save @lv00/scrapper_lib
Usage
const { priceFetcher } = '@lv00/scrapper_lib'
const urls = [
'https://www.topachat.com/pages/detail2_cat_est_micro_puis_rubrique_est_wgfx_pcie_puis_ref_est_in20006956.html#avis',
'https://www.ldlc.com/fr-be/fiche/PB00468696.html',
'https://www.reichelt.com/be/en/coupling-relay-narrow-250-v-24-v-fin-38-51-24v-p28317.html?&nbc=1&trstct=adw_161853',
'https://www.mediamarkt.be/fr/product/_lenovo-r%C3%A9veil-smart-clock-2-shadow-black-za970034se-1964880.html'
];
urls.forEach(async (url) => {
try {
const item = priceFetcher(url);
const data = await item.parse();
console.log(data);
} catch (err) {
console.log(err);
}
});
// Terminal Output
TopAchat {
available: false,
url: 'https://www.topachat.com/pages/detail2_...',
name: 'Gainward GeForce GTX 1650 D6 GHOST',
price: { price: 279.99, type: { key: 'EUR', name: 'Euro', symbol: '€' } }
}
Ldlc {
available: true,
url: 'https://www.ldlc.com/fr-be/fiche/PB00468696.html',
name: 'Pokemon Perle Scintillante (SWITCH)',
price: { price: 59.13, type: { key: 'EUR', name: 'Euro', symbol: '€' } }
}
TopAchat {
available: true,
url: 'https://www.reichelt.com/be/en/coupling-...',
name: 'Coupling relay, narrow, 250 V, 24 V',
price: { price: 10.12, type: { key: 'EUR', name: 'Euro', symbol: '€' } }
}
MediaMarkt {
available: true,
url: 'https://www.mediamarkt.be/fr/product/_lenovo-r%C3%A9veil-smart-clock-2-shadow-black-za970034se-1964880.html',
name: 'LENOVO Réveil Smart Clock 2 Shadow Black (ZA970034SE)',
price: { price: 44.99, type: { key: 'EUR', name: 'Euro', symbol: '€' } }
}