Skip to content

A PHP based script to scrape Genres for a specific Steam Game

Notifications You must be signed in to change notification settings

fragxz/PhpSteamGenreScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

PhpSteamGenreScraper

A PHP based script to scrape Genres for a specific Steam Game

Requirements:

PHP 7.0+

Usage:

 $arrayWithGames = ['The Witcher 3: Wild Hunt - Blood and Wine'];
 $scraper = new SteamGenreScraper;
 echo $scraper->getGenreByGameName($arrayWithGames[0]);

Result:

RPG, Open World, Story Rich, Atmospheric

Explanation:

You have an Array with Games and you want to know the genre for these Games. Steam doesn't have an API for it, so use this scraper!

Let's say we want to know the Genres for the game "The Witcher 3: Wild Hunt - Blood and Wine". We have the following Array

$arrayWithGames = ['The Witcher 3: Wild Hunt - Blood and Wine'];

If you use the class for example, you'll get the following genres:

RPG, Open World, Story Rich, Atmospheric

It scrapes the genres from the Store Page. So the genres you get back may change, depending how many users voted for a certain genre.

Known Issues

The scraper can't get genres for games that needs an age verification (18+). Workarounds are possible, but not directly supported by this script.

About

A PHP based script to scrape Genres for a specific Steam Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages