Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.
/ justbrowse.io Public archive

A nodejs package to interact with the justbrowse.io

License

Notifications You must be signed in to change notification settings

MrlolDev/justbrowse.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Client(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 (Beta)

import { Crawl } from "justbrowse.io";

(async () => {
  var client = new Crawl();
  var url = "https://google.com?q=news+for+today";
  var html = await client.html(url);
  console.log(html);
  var text = await client.text(url);
  console.log(text);
})();

About

A nodejs package to interact with the justbrowse.io

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published