wololodev / d2mt

Competitive coverage on the go!
37 stars 11 forks source link

Getting full and correct name from Gosugamer #15

Closed piemo closed 9 years ago

piemo commented 10 years ago

Hey there! I was working on a parser myself before discovering this project. It works great and I congratulate with you for that.

There is just a minor issue in my opinion (not really your fault). When you scrape the names from the page of GosuGamers, some names are cut off due to excessive length in their website. I fixed that problem on my parser opening the corresponding match page and scraping the name from there. I was wondering if you could do that as well, cause it would make the APIs PERFECT!

Also I've noticed that gosugamer also adds "DOTA 2" to the team name when the team is a Multigaming. If you're going to make this little change, please consider removing it.

I would do these changes myself, but I have no idea how to code in PHP.

I hope i'm not going to look as a guy that just come here to ask for stuff!

MasterOdin commented 10 years ago

Should be implemented now.

piemo commented 10 years ago

Awesome, works perfectly :+1:

piemo commented 10 years ago

ah, i was wondering, why the news, standing and vod section are not aviable to use?

wololodev commented 10 years ago

Gosugamer is not getting updated :/ something wrong in the cron process @MasterOdin

MasterOdin commented 10 years ago

@piemo Are you talking about the v2 api? That hasn't changed (for either gg or jd) in a long time and may still be broken. At the moment, I would only guarantee that the latest versions in the other folders in the api directory work (though for jD, it's v130 that works). I haven't felt the need to keep v2 up-to-date as I'm not sure anyone uses it at the moment as it is part of a larger rewrite.

the GosuGamer tab should be updated though now.

piemo commented 10 years ago

yeah sorry if I didn't explain myself enough ( i though the V2 api were correct and still working ).

What I meant is that i though there was a v2 version of the vod and standings pages, but yeah i figured that out.

By the way i tried using your webpage ( http://api.dotaprj.me/) to try obtain the matches ( from jd and gg ), but i noticed that, not like the other apis ( where it's super fast), the loading times are pretty long, Is that intended?

MasterOdin commented 10 years ago

It's because the parser has to crawl through the GG and jD sites HTML to get the information. This is time consuming and why it produces that api.json file you see in the Github directories. The extension utilizes these files as well when you click the button to keep things snappy. I looked into the GG API that they've released, but unfortunately it doesn't expose enough information to be a complete replacement for what we have.

So if you wanted to utilize this stuff for your own thing, you'd want to just use the api.json files.