Git Product home page Git Product logo

steamcrawl's Introduction

PyPI License: MIT Repo Size GitHub follow

steamcrawl

A package that helps extract Steam store and community market data as pandas DataFrame for better readability and usability for research purposes. The package makes queries to different Steam APIs, then cleans and extracts the important variables from the JSON object result and returns a pandas DataFrame.

With the Steam request limit, you can make 200 requests every 5 minutes. If you exceed the limit, Steam can give you a cooldown of (possibly) a few 1,2 minutes to 6 hours (depending on the API). Please make an appropriate number of requests at a given time. It is recommended to close any Steam web and application to limit the requests you are sending.

Installation and setup

The following libraries are used in the package. Thus, the requirement of their installation must be met:

  • pandas==1.5.1
  • requests==2.29.0
  • selenium-wire==5.1.0

You can download the package from PyPI using pip:

pip install steamcrawl

Before starting, you need to obtain the value of the cookie steamLoginSecure. This can be done by opening DevTools (Ctrl + Shift + I) on steamcommunity.com, Application (on the task bar), Cookies:

The package requires this value to be passed in order to return the data using the information related to you (for example currency). Please be aware that it is absolutely safe to put your steamLoginSecure into the program. The package does not attempt to record/send to another source any of your information; even with your steamLoginSecure value, there is nothing valuable another user can extract (for e.g make trades, credit card info, etc.) because Steam does not allow any important decisions being made throughout the API.

Please do note that the value of steamLoginSecure refreshes by Steam once a day. You will have to update the new cookie (using the same method) into the program if you want to keep using it.

Documentation

The full documentation is available at the GitHub Wiki.

Example

Initialize the Request class with your steamLoginSecure as string:

from steamcrawl import Request
import pandas as pd

request = Request('your steamLoginSecure here')

Get your market trade history:

data_frame = request.get_market_history(count = 10)
data_frame.to_csv('example.csv')

The obtained result is (this is only part of the result):

example1

Get buy/sell orders of an item:

data_frame = get_buysell_orders(item_name = "USP-S | Printstream (Field-Tested)", appid="730")
# appid 730 indicates Counter-Strike: Global Offensive game. 
# Obtain the appid for a game using get_all_appid().
data_frame.to_csv('example.csv')

The obtained result is (this is again only part of the result).

example2

A small note is, please do not be alerted by the popping up browser for this request, this is only the behavior of the seleniumwire package used for this function.

Contributions:

This project is created and managed by only one user Hungreeee. Therefore, errors are entirely possible to occur anywhere in the program. If you found any bug you would like to report, please open a new Issue.

If you would like to suggest changes to current features or new features implementation, please also open a new Issue and I will check it out as soon as I can.

Legal

This project is in no way affiliated with, authorized, maintained, sponsored or endorsed by Valve or any of its affiliates or subsidiaries. This is an independent and unofficial project created by Hungreeee. Use it at your own risk.

steamcrawl's People

Contributors

hungreeee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

visionarylab

steamcrawl's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.