mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-01 11:49:31 +08:00
Fixed marketSearch (fixes #112)
This commit is contained in:
parent
17e5b94782
commit
60e0e63a92
@ -27,12 +27,13 @@ SteamCommunity.prototype.marketSearch = function(options, callback) {
|
||||
qs.count = 100;
|
||||
qs.sort_column = 'price';
|
||||
qs.sort_dir = 'asc';
|
||||
performSearch.call(this, this.httpRequest, qs, [], callback);
|
||||
};
|
||||
|
||||
function performSearch(request, qs, results, callback) {
|
||||
var self = this;
|
||||
request({
|
||||
var results = [];
|
||||
performSearch();
|
||||
|
||||
function performSearch() {
|
||||
self.httpRequest({
|
||||
"uri": "https://steamcommunity.com/market/search/render/",
|
||||
"qs": qs,
|
||||
"headers": {
|
||||
@ -70,10 +71,11 @@ function performSearch(request, qs, results, callback) {
|
||||
callback(null, results);
|
||||
} else {
|
||||
qs.start += body.pagesize;
|
||||
performSearch.call(self, request, qs, results, callback);
|
||||
performSearch();
|
||||
}
|
||||
}, "steamcommunity");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function CMarketSearchResult(row) {
|
||||
var match = row.attr('href').match(/\/market\/listings\/(\d+)\/(.+)/);
|
||||
|
Loading…
Reference in New Issue
Block a user