Skip to main content

A package of getting game reviews from steam platform easily, for further text analytics projects.

Project description

Steam Reviews

A package of getting game reviews from steam easily, for further text analytics projects.

Install

The package is available in PyPi.

pip install steam_reviews

Use

Basic usage

For example, we load the reviews of Cyberpunk 2077 from the api. The function load_from_api takes two arguments.

  • First is necessary, the appid. It can be find in the web page of the game in steam store. Like Cyberpunk 2077's page: https://store.steampowered.com/app/1091500/_2077/, the number 1091500 in the url is its appid.
  • Second can be ignored, if you want to take all the reviews, it controls the number of reviews that the program will take from the web api.
from steam_reviews import ReviewLoader
# AppId is 1091500, and we need 1000 reviews
reviews = ReviewLoader().load_from_api(1091500, 1000)
# Save the review text to a list
review_list = reviews.review_list()
print(review_list[0])
# Save the data as json file, provide the folder path as the argument
reviews.save_json('path/to/data/')

With more parameters

You can add more parameters to get customized reviews. More information can be found in the functions' documents in the source code.

set_language() is used most frequently, it sets the language of the reviews that downloaded by the program. All supported language can be found here: https://partner.steamgames.com/doc/store/localization.

from steam_reviews import ReviewLoader
# Set the language of reviews to english
reviews_en = ReviewLoader().set_language('english') \
                        .load_from_api(1091500, 1000)
# Set the language of reviews to simplified chinese
reviews_zh = ReviewLoader().set_language('schinese') \
                        .load_from_api(1091500, 1000)

Load reviews of several games

The funciton load_batch_from_api() can receive a list containing appids and request all the reviews for each of the game.

from steam_reviews import ReviewLoader
appids = [1091500, 1097150]
reviews = ReviewLoader().set_language('english') \
                        .set_num_per_page(50) \
                        .load_batch_from_api(appids, 1000)

Load from local json files

from steam_reviews import ReviewLoader
# File path of the saved json data
file_path = 'path/to/data/reviews_1091500.json'
reviews = ReviewLoader().load_from_local(file_path)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steam_reviews-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steam_reviews-0.1.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file steam_reviews-0.1.1.tar.gz.

File metadata

  • Download URL: steam_reviews-0.1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.24.0 setuptools/49.2.1.post20200807 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.10

File hashes

Hashes for steam_reviews-0.1.1.tar.gz
Algorithm Hash digest
SHA256 705a453a9debc2097f31ebfd84a66a26007cb150c3c656ddc39cd9aa70545391
MD5 5f5835ff0effedf6f2b346c61f95cd5c
BLAKE2b-256 da8e7ba242c223176f3a04c728d0db198db8cf28ac16e3f0115c20a38a2d3be0

See more details on using hashes here.

File details

Details for the file steam_reviews-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: steam_reviews-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.24.0 setuptools/49.2.1.post20200807 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.10

File hashes

Hashes for steam_reviews-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1271daebfcb8c8afc6bb8ba8e846781642c04830b9a4c978f846ebd46c6afbac
MD5 a26e563525438659043b7bc65c6b8118
BLAKE2b-256 96ff0d1ea147bedccb06facd8a60962606d1c373705191c29fef752850c9910c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page