1
votes

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?

1
Can you provide the URL of =IMPORTXML(B3, "//div[@class='profile_ban_status']")? And also, can you provide the output values you expect? - Tanaike
The URL is: https://steamcommunity.com/id/071200 and the expected output would be 1 VAC ban on record - darby
When I try this, I get 1 VAC ban on record | Info in one cell and ` 2306 day(s) since last ban` in another cell, which is to be expected considering the HTML. Do you want something else instead? When you say But it doesn't work, what do you mean exactly? You are not getting the results I mentioned? - Iamblichus
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. So for example, how about =IMPORTXML(B3;"//div[@class='profile_ban_status']")? In this case, , is replaced with ;. But I'm not sure whether this is the direct solution of your issue. I apologize for this. - Tanaike
Thank you for replying. I'm glad your issue was resolved. I thought that your question and the solution will be also useful for other users. So I posted it as an answer. - Tanaike

1 Answers

2
votes

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 ;.