koraktor / steam-condenser

A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers
https://koraktor.de/steam-condenser
Other
359 stars 65 forks source link

Ruby - Fails to pull group data #280

Closed bfosberry closed 8 years ago

bfosberry commented 9 years ago
2.1.2 :004 > g1 = SteamCondenser::Community::SteamGroup.new 103582791430009158
SteamCondenser::Error: XML data could not be parsed: 429 Unknown
    from /home/bfosberry/workspace/steam-condenser-ruby/lib/steam-condenser/community/xml_data.rb:26:in `rescue in parse'
    from /home/bfosberry/workspace/steam-condenser-ruby/lib/steam-condenser/community/xml_data.rb:23:in `parse'
    from /home/bfosberry/workspace/steam-condenser-ruby/lib/steam-condenser/community/steam_group.rb:156:in `fetch_page'
    from /home/bfosberry/workspace/steam-condenser-ruby/lib/steam-condenser/community/steam_group.rb:118:in `fetch'
    from /home/bfosberry/workspace/steam-condenser-ruby/lib/steam-condenser/community/cacheable.rb:44:in `block in method_added'
    from /home/bfosberry/workspace/steam-condenser-ruby/lib/steam-condenser/community/cacheable.rb:105:in `new'
    from (irb):4
    from /home/bfosberry/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>'
2.1.2 :005 >
bfosberry@philooogy:~/workspace/steam-condenser-ruby$ curl -v http://steamcommunity.com/gid/103582791430009158/memberslistxml?p=1
* Hostname was NOT found in DNS cache
*   Trying 23.48.104.136...
* Connected to steamcommunity.com (23.48.104.136) port 80 (#0)
> GET /gid/103582791430009158/memberslistxml?p=1 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: steamcommunity.com
> Accept: */*
> 
< HTTP/1.1 429 Unknown
* Server Apache is not blacklisted
< Server: Apache
< Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' http://steamcommunity-a.akamaihd.net/ https://api.steampowered.com/ http://www.google-analytics.com https://ssl.google-analytics.com https://www.google.com https://www.gstatic.com https://apis.google.com; object-src 'none'; connect-src 'self' http://steamcommunity.com https://steamcommunity.com https://api.steampowered.com/; frame-src 'self' http://store.steampowered.com/ https://store.steampowered.com/ http://www.youtube.com https://www.youtube.com https://www.google.com;
< Content-Encoding: gzip
< Vary: Accept-Encoding
< Content-Type: application/json; charset=utf-8
< Content-Length: 30
< X-Varnish: 65295856
< Date: Fri, 18 Sep 2015 03:09:34 GMT
< Connection: keep-alive
< 
* Connection #0 to host steamcommunity.com left intact
�+����O��%bfosberry@philooogy:~/workspace/steam-condenser-ruby$

Is this api still valid?

koraktor commented 9 years ago

Looks OK for me.

Steam’s APIs (including the Web API) have always been flaky.

koraktor commented 9 years ago

Just noticed the status code. Status 429 means you have been temporarily rate limited.

bfosberry commented 9 years ago

Aha! That makes sense from what I'm seeing elsewhere. Dang, I'll have to sort something out.

On Thu, Sep 17, 2015, 11:33 PM Sebastian Staudt notifications@github.com wrote:

Just noticed the status code. Status 429 http://httpstat.us/429 means you have been temporarily rate limited.

— Reply to this email directly or view it on GitHub https://github.com/koraktor/steam-condenser/issues/280#issuecomment-141341215 .

bfosberry commented 8 years ago

Yeah, looks like I can pull about 7 groups every 15 mins. Amazing stuff, closing this