1.0.6 • Published 11 months ago

@imperatrona/onlyfans-scraper v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Onlyfans Scraper

This lib created for easy access to onlyfans profiles. For analytics only. Dynamic rules fetched from DATAHOARDERS/dynamic-rules on client initialization.

Installation

npm i @imperatrona/onlyfans-scraper

Usage

const Scrapy = require("@imperatrona/onlyfans-scraper");
import Scrapy from "@imperatrona/onlyfans-scraper";

const client = new Scrapy();

try {
  const user = await client.getUser("onlyfans");
  console.log(user);
} catch (err) {
  if (err instanceof Error) {
    console.error(err.message);
  }
}

Set Delay

You can set minimal time to wait between api requests in miliseconds.

client.delay = 5000; // will wait 5s (5000ms) between each api requests

To reset delay just set delay to 0.

client.delay = 0;

Set Proxy

You can add proxy agent after initialization.

import Scrapy from "@imperatrona/onlyfans-scraper";
import { HttpsProxyAgent } from "hpagent";

const client = new Scrapy();
const agent = new HttpsProxyAgent({ proxy: "http://0.0.0.0:0000" });

client.setProxy(agent);

Auth with your credentials

By default client generate anon credentials, but you can use your personal account.

import Scrapy from "@imperatrona/onlyfans-scraper";

const client = new Scrapy({
  userId: "",
  userAgent: "",
  xBc: "",
  cookie: "",
});

Get credentials

const client = new Scrapy();
const auth = client.GetSession();
1.0.6

11 months ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago