Skip to content

TradingView homepage no longer has following and followers number of authenticated user #215

@billyma128

Description

@billyma128

Describe the bug
TradingView homepage no longer has following and followers number of authenticated user, so when call getUser which will cause error.

// src/miscRequests.js#429
following: parseFloat(/,"following":([0-9]*?),/.exec(rs)[1] || 0),
followers: parseFloat(/,"followers":([0-9]*?),/.exec(rs)[1] || 0),

Uncaught TypeError TypeError: Cannot read properties of null (reading '1')

To Reproduce

import TradingView from "@mathieuc/tradingview";

const SESSION_ID = "xxx";
const signature = "xxx";
const client = new TradingView.Client({
  token: SESSION_ID,
  signature,
});

Expected behavior
works without error

Screenshots

Environment:

  • OS: MacOS
  • Node version: v20.5.0
  • TradingView Premium

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions