Skip to content

Instantly share code, notes, and snippets.

View asad-haider's full-sized avatar
💻
working

Asad Haider asad-haider

💻
working
View GitHub Profile
@asad-haider
asad-haider / spidey-proxy-integration.js
Created May 16, 2023 11:15
Spidey tutorial with rotating proxy integration
const { Spidey } = require('spidey');
const { MongoClient } = require('mongodb');
class MongoPipeline {
options;
client;
collection;
constructor(options) {
this.options = options;
@asad-haider
asad-haider / spidey-mongo-pipeline.js
Created May 14, 2023 00:03
Spidey pipeline tutorial with MongoDB integration
const { Spidey } = require("spidey");
const { MongoClient } = require("mongodb");
class MongoPipeline {
options;
client;
collection;
constructor(options) {
this.options = options;
@asad-haider
asad-haider / spidey-pipeline-tutorial.js
Created May 12, 2023 10:26
Spidey Pipeline Tutorial
const { Spidey, DiscardItemError } = require('spidey');
class AsinPipeline {
constructor() {}
process(item) {
const asin = item.url.match(/\/dp\/([A-Z0-9]{10})/)[1];
item.asin = asin;
return item;
}