Answer the question
In order to leave comments, you need to log in
Authorization on request request through cookies and getting data?
I want to get data by link, but they are available only to authorized users.
Found the answer for python and it was to receive the request along with the steamLoginSecure cookies
cookie = {'steamLoginSecure': '76561138023312211%7C%7CC601EA857111ADADA2FB350CBA0A2C1E02C39E5C'};
item = requests.get('https://steamcommunity.com/market/pricehistory?currency=3&appid=730&market_hash_name=%27Blueberries%27%20Buckshot%20|%20NSWC%20SEAL', cookies=cookie);
item = item.content;
item = json.loads(item);
print(item);
var j = request.jar();
var cookie = request.cookie('steamLoginSecure=76561138023312211%7C%7CC601EA857111ADADA2FB350CBA0A2C1E02C39E5C');
var url = 'https://steamcommunity.com/market/pricehistory?currency=3&appid=730&market_hash_name=%27Blueberries%27%20Buckshot%20|%20NSWC%20SEAL');
j.setCookie(cookie, url);
request.get({url: url, jar: j}, function(err, response, body) {
console.log(body);
return;
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question