1.0.5 • Published 2 years ago

@imperatrona/onlyfans-scraper v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Onlyfans Scraper

This lib created for easy access to onlyfans profiles. For analytics only. Dynamic rules fetched from deviint/onlyfans-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.2

2 years ago

1.0.1

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.0

2 years ago