claabs / csgostatsgg-scraper Goto Github PK
View Code? Open in Web Editor NEWA consumable package to (heavy-handedly) scrape data from csgostats.gg
Home Page: https://www.npmjs.com/package/csgostatsgg-scraper
License: MIT License
A consumable package to (heavy-handedly) scrape data from csgostats.gg
Home Page: https://www.npmjs.com/package/csgostatsgg-scraper
License: MIT License
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
When making requests the SecretAgent browser window and debug tools open and if I close them, new requests will hang.
Is this https://csgostats.gg/player/multi
support yet? Thanks.
Code noob here, sorry for bothering you with such stupid questions...
How do I run the code and use it within my website? How do I input the player ID?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.