step7750 / node-csgo-cdn Goto Github PK
View Code? Open in Web Editor NEWRetrieves the Steam CDN Image URLs for CS:GO Items
License: MIT License
Retrieves the Steam CDN Image URLs for CS:GO Items
License: MIT License
Can you update this ? Not work with current node-user version.
After cs2 release this library is not working anymore, it shows the following error:
/node_modules/csgo-cdn/index.js:287
let name = file.filename.split('\');
^
TypeError: Cannot read properties of undefined (reading 'filename')
Any ideas?
const SteamUser = require('steam-user');
const csgoCDN = require('csgo-cdn');
const user = new SteamUser();
user.logOn("XXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXX")
const cdn = new csgoCDN(user, {logLevel: 'debug'});
cdn.on('ready', () => {
console.log(cdn.getItemNameURL("Fracture Case"));
});
After writing that it returns;
[csgo-image-cdn] error: Failed to retrieve resource/flash/econ/weapon_cases/crate_community_26.png in VPK, do you have the package category enabled in options?
Thanks for your really fast reply :- )
now the item I told you is existing.
But unfortunately there are still alot of missing Items, I'm not sure if I did something wrong or they are not correctly written by myself.
Please look at the .txt file, this are the items, which are listed as undefined.
Thanks again in advance for your help :-)
Try:
Sealed Graffiti | HellRaisers | Atlanta 2017
and
Sticker | HellRaisers | Atlanta 2017
This same result :)
https://steamcdn-a.akamaihd.net/apps/730/icons/econ/stickers/atlanta2017/hlr_large.389cb3f3b08a3a66f2a2d3921d0292f585347975.png
Hi, I wanted to ask if there is anyway to retrieve a tinier image for guns and knives, since the defaults weighs about 60kb.
Thanks
Does not work for graffiti with color
e.g: Sealed Graffiti | Popdog (Blood Red)
return (https://steamcdn-a.akamaihd.net/apps/730/icons/econ/stickers/default/popdog_large.e248a907ba21ac78e30df6653eebd8f0090e3a83.png)
Is there any schedule on when to publish the new changes to npm?
For some reason, it's returning undefined for these items.
Talon Knife missing Phase images, gems are fine.
cdn.getItemNameURL(marketHashName, phase)
(node:60848) [steam-user] Warning: No branch name was specified for app 730, depot 731. Assuming "public".
(Use `node --trace-warnings ...` to show where the warning was created)
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
OperationalError: HTTP error 404
at ClientRequest.<anonymous> (/Users/-/melo/-/stickers/node_modules/steam-user/components/cdn.js:585:13)
... 9 lines matching cause stack trace ...
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
cause: Error: HTTP error 404
at ClientRequest.<anonymous> (/Users/-/melo/-/stickers/node_modules/steam-user/components/cdn.js:585:13)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:701:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at Socket.socketOnData (node:_http_client:542:22)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23),
isOperational: true
}
Since valve removed the schema API, I tried to find a way to get the images for each cs medal, service medals coins etc...
I stumbled upon this today, and played around with it and added a function that implements getMedalUrl
which just does the same thing as every other get function, but it looks in the resource/flash/econ/status_icons files.
I also added getItems
in order for me to just loop over this.itemsGame.items
Is that something that would be accepted as a MR, or should I just keep it my version
Hello @Step7750
When i start the app, the app throwing following error:
[csgo-image-cdn] info: Checking for CS:GO file updates
[csgo-image-cdn] info: Already downloaded ./data/pak01_106.vpk
[csgo-image-cdn] info: Already downloaded ./data/pak01_107.vpk
[csgo-image-cdn] info: Already downloaded ./data/pak01_109.vpk
[csgo-image-cdn] info: Already downloaded ./data/pak01_110.vpk
[csgo-image-cdn] info: Already downloaded ./data/pak01_112.vpk
[csgo-image-cdn] info: Already downloaded ./data/pak01_113.vpk
(node:26824) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'data/pak01_092.vpk'
What is pak01_092.vpk
, how can we fix it?
Thank you so much :)
Hello :-)
Unfortunately, around 3000 weapons/items can't be found, one of them is "MP7 | Army Recon (Minimal Wear)".
Please tell if a vpk Package is missing, because you told in Readme that Package 57, 83 and 84 are important ones, but i only see package 57, 63, 83 in my data folder.
Thanks for your help :-)
Some sticker return nothing, e.g. this:
"material": "chicken_capsule/BoneHead_pack01" / "name": "Sticker | Bonehead"
or
"material": "chicken_capsule/NestEgg_pack01" / "name": "Sticker | Nest Egg"
Seems like getManifestAsync is not a function?
Line 186 in 44955ca
(node:33552) UnhandledPromiseRejectionWarning: Error: Fail
at Object.exports.eresultError (node-csgo-cdn\node_modules\steam-user\components\helpers.js:96:12)
at SteamUser.<anonymous> (node-csgo-cdn\node_modules\steam-user\components\cdn.js:153:27)
at SteamUser._handleMessage (node-csgo-cdn\node_modules\steam-user\components\messages.js:569:34)
at SteamUser._handleNetMessage (node-csgo-cdn\node_modules\steam-user\components\messages.js:506:7)
at SteamUser.processMulti (node-csgo-cdn\node_modules\steam-user\components\messages.js:598:9)
at SteamUser.<anonymous> (node-csgo-cdn\node_modules\steam-user\components\messages.js:592:16)
at node-csgo-cdn\node_modules\steam-user\components\classes\HandlerManager.js:37:12
at Array.forEach (<anonymous>)
at HandlerManager.emit (node-csgo-cdn\node_modules\steam-user\components\classes\HandlerManager.js:36:12)
at SteamUser._handleMessage (node-csgo-cdn\node_modules\steam-user\components\messages.js:571:24)
at SteamUser._handleNetMessage (node-csgo-cdn\node_modules\steam-user\components\messages.js:506:7)
at WebSocketConnection._readMessage (node-csgo-cdn\node_modules\steam-user\components\connection_protocols\websocket.js:186:12)
at WebSocket.emit (events.js:315:20)
at node-csgo-cdn\node_modules\websocket13\lib\base.js:518:10
at pipe (node-csgo-cdn\node_modules\websocket-extensions\lib\pipeline\index.js:37:40)
at Pipeline._loop (node-csgo-cdn\node_modules\websocket-extensions\lib\pipeline\index.js:44:3)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:33552) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
`--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:33552) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
doing some detective work seems to show that it's coming from the "getManifestAsync" as no such function exists when promisifying the SteamUser object. Any help would be greatly appreciated!
I am having Cannot find module 'vpk' error.
I also don't know how to set up to work. Can anyone help me?
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.