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

Team data not parsing #10

Closed
Morb0 opened this issue Aug 13, 2017 · 10 comments
Closed

Team data not parsing #10

Morb0 opened this issue Aug 13, 2017 · 10 comments
Labels

Comments

@Morb0
Copy link
Contributor

Morb0 commented Aug 13, 2017

Sometimes the name or id of one of the teams is not parsed.
{ "id":2313372, "team1":{ "name":"Majestic Lions", "id":6576 }, "team2":{ "name":"", "id":5412 }, "event":{ "name":"PG WAY Trnava 2017", "id":null }, "format":"Best of 3", "maps":[ "ovp", "inf", "mrg" ], "stars":0, "live":true }

@gigobyte gigobyte added the bug label Aug 14, 2017
@Morb0
Copy link
Contributor Author

Morb0 commented Aug 14, 2017

You can fix this? Because of this, the module does not work.

@gigobyte
Copy link
Owner

Which methods does this bug affect?

@Morb0
Copy link
Contributor Author

Morb0 commented Aug 14, 2017

I meant that this function is very important where I use it and without it nothing works.

@gigobyte
Copy link
Owner

You never mentioned which function. From the looks of it, it's the getMatches function, is that correct?

@Morb0
Copy link
Contributor Author

Morb0 commented Aug 14, 2017

Yes, getMatches function.

@Morb0
Copy link
Contributor Author

Morb0 commented Aug 14, 2017

Can you fix?

gigobyte added a commit that referenced this issue Aug 14, 2017
@gigobyte
Copy link
Owner

Issue should be fixed in v2.1.1

@Morb0
Copy link
Contributor Author

Morb0 commented Aug 14, 2017

Now only in the first live match the second team did not parsed name: { "id":2313358, "team1":{ "name":"Goliath", "id":8193 }, "team2":{ "name":"", "id":5153 }, "event":{ "name":"ESEA Open Season 25 South Africa", "id":3043 }, "format":"Best of 3", "maps":[ "ovp", "cch", "nuke" ], "stars":0, "live":true }

@gigobyte
Copy link
Owner

I can't reproduce it, this bug is fixed in the latest version, have you updated?

{ id: 2313358, team1: { name: 'Goliath', id: 8193 }, team2: { name: 'eNergy', id: 5153 }, event: { name: 'ESEA Open Season 25 South Africa', id: 3043 }, format: 'Best of 3', maps: [ 'ovp', 'cch', 'nuke' ], stars: 0, live: true }

@Morb0
Copy link
Contributor Author

Morb0 commented Aug 14, 2017

Yes, i update. I try to check parsing this code:
`const fs = require('fs');
const { HLTV } = require('hltv');

HLTV.getMatches().then(matches => {
fs.writeFileSync('./matches.txt', JSON.stringify(matches));
});`

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

No branches or pull requests

2 participants