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.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: steam_reviews-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 47b555b405eaad11960501072fcc094218a817e0c131bf62a3f68f035b0a7a57
MD5 8fcb9f9f0ff34cd70555756f3a38599b
BLAKE2b-256 c7e4c6253ccfc498962d2e915a0200dc1a144b2b26adb31021430ee78888c75a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: steam_reviews-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a438bd8848eb6899c390ebaf5d36d9a38e6d2b19055ab8407ddeebb99098f8f
MD5 361457454eac83f4cc1296fe29d940d7
BLAKE2b-256 3ea69d8bafd55f4da9cbd8033110bd8045b1f571e928d5264db3db1fee11fcb0

See more details on using hashes here.

Supported by

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