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.