1

Alright, so I found my basic answer from these posts, 2-3 years ago.

Extract data from Steam

Import total hours on Steam

Steam has updated its website since then, so I've messed around with it and attempted to make it work.. this is currently what I have, and what I'm getting.

=REGEXEXTRACT(REGEXEXTRACT(CONCATENATE(IMPORTXML("https://steamcommunity.com/profiles/76561198103825553/games/", "//script")),"\(([Garry's Mod]+)\)"),"[0-9]+")&" hrs last two weeks"

Error Function REGEXEXTRACT parameter 2 value "[0-9]+" does not match text of Function REGEXEXTRACT parameter 1 value "o".

0

=REGEXEXTRACT(INDEX(SPLIT(SUBSTITUTE(INDEX(IMPORTXML(
 "https://steamcommunity.com/profiles/76561198103825553/games/", "//*"), 1, 2),
 "hours"":""", "♦"), "♦"), 1, 2), "\d+.\d+|\d+")&" hrs last two weeks"

0

  • 1
    Much appreciated, this helps me learn as well, I didn't think of separating it bit by bit by using INDEX. – Nate.M-C Apr 9 at 0:48
  • One thing I don't understand, however, is the usage of ♦ What exactly is it representing? – Nate.M-C Apr 9 at 2:09
  • thats because of SPLIT coz if we would split by hours":" it would split stuff after each character eg. h, o, u, etc. so we convert hours":" to and split by unique symbol "♦" – user0 Apr 9 at 2:13
  • Thank you so very much for the explanation! If you wouldn't mind, one more time. I attempted to edit the formula for another webpage, but I'm getting the error that valid INDEX values are only 1 and 0. I'm assuming because the format of this website is different, there is a space between the word steamID64 and the digits I want to grab, as well as no quotes, but I'm not entirely sure. =REGEXEXTRACT(INDEX(SPLIT(SUBSTITUTE(INDEX(IMPORTXML( "https://steamid.io/lookup/STEAM_0:0:194919430", "//*"), 1, 2), "SteamID64", "♦"), "♦"), 1, 2), "\d+") – Nate.M-C Apr 9 at 2:29
  • =REGEXEXTRACT(INDEX(ARRAY_CONSTRAIN(IMPORTDATA("https://steamid.io/lookup/STEAM_0:0:194919430"),200,1),127,1),"\>(\d+)\<") – user0 Apr 9 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.