Search code examples
google-sheetsweb-scrapinggoogle-sheets-formulasteam

Getting the value from a steam profile using importxml


I wanted to create a google sheet where I put some steam profile links that I know are banned. And in the row next to it I wanted to output via importxml how long they are already banned.

Steam Class for ban is:

<div class="profile_ban_status">
    <div class="profile_ban">
                    1 VAC ban on record                 
<span class="profile_ban_info">| <a class="whiteLink" href="https://support.steampowered.com/kb_article.php?ref=7849-Radz-6869&amp;l=english" target="_blank" rel="noreferrer">Info</a></span>
                </div>
                                    2306 day(s) since last ban                              </div>

My importxml looks like this:

=IMPORTXML(B3, "//div[@class='profile_ban_status']")

But it doesn't work. Can anybody help me fix it?


Solution

  • When I tested your formula of =IMPORTXML(B3,"//div[@class='profile_ban_status']"), no error occurs and the value of 1 VAC ban on record | Info is obtained.

    In this case, I would like to prpopose the following modification.

    From:

    =IMPORTXML(B3,"//div[@class='profile_ban_status']")
    

    To:

    =IMPORTXML(B3;"//div[@class='profile_ban_status']")
    
    • In this modification, , is replaced with ;.