I can not get the data in any way, I want to parse the user's inventory, I used to do it via php, but because of frequent calls from the ip server I put the steam on a temporary ban, I decided to move the parsing to the client.

Пробовал как через Ajax, так и через XMLHttpRequest

Here is the code I use:

Ajax:

  $.ajax({ type: 'GET', url: "http://steamcommunity.com/profiles/"+steamid+"/inventory/json/730/2", jsonpCallback: 'jsonCallback', dataType: 'jsonp', success: function( data ) { console.log( data ); }, error: function(e) { console.log('errorrrrrrrrrr', e.message); } }); 

Beats this error: Console errors

Json error

I can not understand what's the matter, help please

  • one
    > I tried both via Ajax and XMLHttpRequest. This is the same) In general, the browser will not allow such a request to be sent. - jekaby
  • @jekaby, it depends on the headers - it can give. - Qwertiy
  • @Qwertiy generally yes) Just what is the point for steam in Origin: to skip any questionable hosts) And, perhaps, the browser will send a request, but the answer will not be processed. - jekaby
  • @jekaby, can you tell me how to solve this problem with the server-side ban? - Vladislav Siroshtan
  • @ Vladislav Siroshtan I do not .. maybe someone else knows. All headers set as in real requests. And if there is a limit of requests for ip, then only by increasing the number of ip-addresses .. - jekaby

1 answer 1

 dataType: 'jsonp', jsonp: false, 

Very doubtful combination.

  • one
    ahaha, plyusanul)) - ikerya