0.1.2 • Published 1 year ago

justbrowse.io v0.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

justbrowse.io

A nodejs package to interact with the justbrowse.io

Installation

npm i justbrowse.io
pnpm add justbrowse.io
yarn add justbrowse.io

Usage

ChatGPT

We create our client:

import { ChatGPT } from "justbrowse.io";
const sessionToken = "Read Bellow how to get your chatgpt session token";
const apiToken = "Go to https://justbrowse.io to get your api token"; // API token is now optional

(async () => {
  var client = new ChatGPT(sessionToken);
  // var client = new Client(sessionToken, apiToken);
  await client.init();
  // check status:
  var status = await client.status();
  if (status == "ready") {
    // Send a message:
    var response = await client.chat("message");
    console.log(response);
    // Create a new conversation:
    var conversation = await client.createConversation();
    // send a message to the conversation:
    var res = await conversation.sendMessage("message", message);
    console.log(res);
  }
})();

Get your session token:

  1. Go to https://chat.openai.com/chat
  2. Log in to your account
  3. Open developer tools
  4. Go to the application section
  5. Go to the cookies section
  6. And get your session token which is the cookie with the name: "__Secure-next-auth.session-token"

Crawler

import { Crawl } from "justbrowse.io";
(async () => {
  // Crawl html
  var { requestId, html } = await Crawl(
    "html",
    "https://google.com?q=news+for+today"
  );
  console.log(requestId, html);

  // Crawl text
  var { requestId, text } = await Crawl(
    "text",
    "https://google.com?q=news+for+today"
  );
  console.log(requestId, text);
})();
0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7-alpha.0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago