Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to retrieve player data? #10

Open
DylanDelobel opened this issue Aug 3, 2023 · 6 comments
Open

How to retrieve player data? #10

DylanDelobel opened this issue Aug 3, 2023 · 6 comments

Comments

@DylanDelobel
Copy link

Here my snippet

I tried true/false (npm install local hero)

export const csgo = new CSGOStatsGGScraper({
    useLocalHero: true
});

with

const data = await csgo.getPlayer('76561197983832927');
console.log(data);

I got the following output

2023-08-03T13:16:22.738Z ERROR [hero-core\connections\ConnectionToHeroClient] ConnectionToClient.HandleRequestError {
  context: {},
  sessionId: '8dhUWdGGicT3Trw2amTRI',
  sessionName: undefined
} InjectedScriptError: TypeError: Cannot read properties of null (reading 'src')
    at JsPath.runJsPath (DiscordBotBot\agent\main\lib\JsPath.ts:165:13)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:447:9)
    at async FrameEnvironment.execJsPath (DiscordBotBot\node_modules\core\lib\FrameEnvironment.ts:245:12)
    at async CommandRecorder.runCommandFn (DiscordBotBot\node_modules\core\lib\CommandRecorder.ts:90:16)
    at async CommandRunner.runFn (DiscordBotBot\node_modules\core\lib\CommandRunner.ts:36:14)
    at async ConnectionToHeroClient.executeCommand (DiscordBotBot\node_modules\core\connections\ConnectionToHeroClient.ts:258:12)
    at async ConnectionToHeroClient.handleRequest (DiscordBotBot\node_modules\core\connections\ConnectionToHeroClient.ts:66:14) {
  pathState: { step: 'src', index: 2 }
}
InjectedScriptError: TypeError: Cannot read properties of null (reading 'src')
    at JsPath.runJsPath (DiscordBotBot\agent\main\lib\JsPath.ts:165:13)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:447:9)
    at async FrameEnvironment.execJsPath (DiscordBotBot\node_modules\core\lib\FrameEnvironment.ts:245:12)
    at async CommandRecorder.runCommandFn (DiscordBotBot\node_modules\core\lib\CommandRecorder.ts:90:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AwaitedHandler.getProperty (DiscordBotBot\node_modules\files\2-finalized\awaited-dom\base\AwaitedHandler.ts:25:12)
    at async CSGOStatsGGScraper.getPlayer (DiscordBotBot\node_modules\csgostatsgg-scraper\src\player.ts:174:29)
    at async run (DiscordBotBot\node_modules\p-queue\dist\index.js:163:29)

--------------------------------------------------
--------------------------------------------------
------8dhUWdGGicT3Trw2amTRI-----------------------
-------------------------------------------------- {
  pathState: { step: 'src', index: 2 }
}

I don't understand what the error here is to debug further

@sruusk
Copy link
Contributor

sruusk commented Aug 3, 2023

It fails to get the esea url. The csgostats developer likes to use esea company time to keep breaking this package.

@DylanDelobel
Copy link
Author

@sruusk Is there a older version I could rollback or a quickfix to skip esea results ? 🙏

@sruusk
Copy link
Contributor

sruusk commented Aug 3, 2023

I only collects the link to the esea profile. Should probably just remove it from the scraper entirely. What do you think @claabs?

@sruusk
Copy link
Contributor

sruusk commented Aug 3, 2023

Oh, and there is no way to rollback or skip the esea link at the moment.

@DylanDelobel
Copy link
Author

Any update?

@claabs
Copy link
Owner

claabs commented Sep 7, 2023

I'm not able to actively maintain this package anymore. Feel free to make a PR with the needed fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants