Jump to content

Retrieve Config Data and Save Data location through the API


sometempaccount
 Share

Recommended Posts

I want to get the Config Data and Save Data locations for any given game through the API.

 

I've looked at the tables extensively, and the only thing related to this I've found, is the tags table which only holds boolean values, it doesn't give me an actual path.

 

So, is it possible to get this info? Or do I need to resort to web scraping?

Link to comment
Share on other sites

That data is currently not stored separately so you’ve to scrap the wikitext for the page and extract the particular section on your own.

1. Retrieve the page ID for a page based on its Steam AppID:

 https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Infobox_game&fields=Infobox_game._pageID%3DPageID%2CInfobox_game.Steam_AppID&where=Infobox_game.Steam_AppID HOLDS "1245620"&format=jsonfm

2. Retrieve the wikitext of the page with the aforementioned page ID:

https://www.pcgamingwiki.com/w/api.php?action=parse&format=json&pageid=146683&prop=wikitext

3. And then use regex or such to extract the relevant paths you’re after.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Found PCGamingWiki useful? Please consider making a Donation or visiting our Patreon.
  • Who's Online   1 Member, 0 Anonymous, 308 Guests (See full list)

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    1.8k
    Total Topics
    9.2k
    Total Posts
×
×
  • Create New...