TheFabulousPika / steam-chatlog-to-text

A chrome extension that converts Steam webchat log to text format
2 stars 0 forks source link

Store link with no price #61

Closed TheFabulousPika closed 2 years ago

TheFabulousPika commented 3 years ago

L296 var gamePrice = thisMsgNode.querySelectorAll('[class*=ChatMessageSteamStore_Pricing_Final]')[1].innerHTML; fails

<div class="msgText " data-copytext=""><span data-copytext="" data-copystyle="merge-adjacent" bbcode-text="I thought you might like this one ">I thought you might like this one </span>
  <div class="bbcode_ChatMessageSteamStore_gwzSZ" style="">
    <div class="bbcode_ChatMessageSteamStore_Header_3X7hC" style=""><img class="bbcode_ChatMessageSteamStore_HeaderImage_2s811" src="https://cdn.akamai.steamstatic.com/steam/apps/1210320/header.jpg?t=1612744225"><img class="bbcode_ChatMessageSteamStore_HeaderImage_2s811 bbcode_Blurred_3BKMl" src="https://cdn.akamai.steamstatic.com/steam/apps/1210320/header.jpg?t=1612744225">
      <div class="bbcode_ChatMessageSteamStore_GameDetails_99hwV">
        <div class="bbcode_ChatMessageSteamStore_GameNameAndIcon_qa-O1">
          <div class="bbcode_ChatMessageSteamStore_Name_2-b92">Potion Craft: Alchemist Simulator</div>
        </div>
        <div>from <span style="color: rgba(255, 255, 255, 0.8);">niceplay games</span></div>
        <div style="font-size: 12px;">Release Date: <span style="color: rgba(255, 255, 255, 0.8);">2021. Wishlist and follow!</span></div>
      </div>
    </div>
    <div class="bbcode_ChatMessageSteamStore_Body_1L1hB">
      <div class="bbcode_ChatMessageSteamStore_DetailsContainer_2d12m">
        <div class="bbcode_ChatMessageTweet_NameSection_3c-Qw">
          <div class="bbcode_ChatMessageSteamStore_Description_17PwS">Potion Craft is an alchemist simulator where you physically interact with your tools and ingredients to brew potions. You're in full control of the whole shop: invent new recipes, attract customers and experiment to your heart's content. Just remember: the whole town is counting on you. </div>
          <div class="bbcode_ChatMessageSteamStore_Footer_1mXJd">
            <div class="bbcode_ChatMessageSteamStore_PricingContainer_fYTQK">
              <div class="bbcode_ChatMessageSteamStore_Pricing_bKeQr">
                <div class="bbcode_ChatMessageSteamStore_Pricing_FinalContainer_3piGx"></div>
              </div>
              <div class="bbcode_ChatMessageSteamStore_ViewStore_1_czf">View Store Page</div>
            </div>
            <div class="bbcode_ChatMessageSteamStore_CopyURL_23S5M" title="Copy Link to Clipboard"><svg version="1.1" class="SVGIcon_Button SVGIcon_CopyToClipboard" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="256px" height="256px" viewBox="0 0 256 256">
                <polyline fill="none" class="line" stroke-width="12" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="178.25,197.25 247,197.25 247,82.5 175,10.25 111.5,10.25 111.5,56 "></polyline>
                <polygon fill="none" class="line" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" points="155,133 83,60.75 11,60.75 11,247.75 155,247.75 "></polygon>
                <polyline fill="none" class="line" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" points="83,60.75 83,133 155,133 "></polyline>
                <polyline fill="none" class="line" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" points="175,10.25 175,82.5 247,82.5 "></polyline>
              </svg></div>
          </div>
        </div>
      </div>
      <div class="bbcode_ChatMessageSteamStore_MediaContainer_2i_00">
        <div class="bbcode_ChatMessageSteamStore_MainMedia_28eQq">
          <div class="bbcode_ChatMessageSteamStore_VideoThumbnail_2c-FU"><img src="https://cdn.akamai.steamstatic.com/steam/apps/256820691/movie.293x165.jpg?t=1612289002" style="">
            <div class="bbcode_ChatMessageSteamStore_VideoPlayButton_2oeMy"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" class="SVGIcon_Button SVGIcon_Play" x="0px" y="0px" width="256px" height="256px" viewBox="0 0 256 256">
                <path class="playTriangle" d="M65.321,33.521c-11.274-6.615-20.342-1.471-20.342,11.52V210.96c0,12.989,9.068,18.135,20.342,11.521l137.244-82.348 c11.274-6.618,11.274-17.646,0-24.509L65.321,33.521z"></path>
              </svg></div>
          </div>
        </div>
        <div class="bbcode_ChatMessageSteamStore_ThumbnailsContainer_246HV">
          <div class="bbcode_ChatMessageSteamStore_Screenshot_3XVGb"><img class="bbcode_ChatMessageSteamStore_ScreenshotThumbnail_3R0VG" src="https://cdn.akamai.steamstatic.com/steam/apps/1210320/ss_b67f65200d6d6fecc222143be6f026430e5bd738.600x338.jpg?t=1612744225"></div>
          <div class="bbcode_ChatMessageSteamStore_Screenshot_3XVGb"><img class="bbcode_ChatMessageSteamStore_ScreenshotThumbnail_3R0VG" src="https://cdn.akamai.steamstatic.com/steam/apps/1210320/ss_f194fd7625644edbfebde9d076bf16a871b8c993.600x338.jpg?t=1612744225"></div>
          <div class="bbcode_ChatMessageSteamStore_Screenshot_3XVGb"><img class="bbcode_ChatMessageSteamStore_ScreenshotThumbnail_3R0VG" src="https://cdn.akamai.steamstatic.com/steam/apps/1210320/ss_a52ff6abe4ee006ae9b86349a57766181b72614b.600x338.jpg?t=1612744225"></div>
        </div>
      </div>
      <div class="bbcode_ChatMessageSteamStore_VideoLargeContainer_2pzdG">
        <div><svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" class="SVGIcon_Button SVGIcon_X_Line" x="0px" y="0px" width="256px" height="256px" viewBox="0 0 256 256">
            <line fill="none" stroke="#ffffff" stroke-width="45" stroke-miterlimit="10" x1="212" y1="212" x2="44" y2="44"></line>
            <line fill="none" stroke="#ffffff" stroke-width="45" stroke-miterlimit="10" x1="44" y1="212" x2="212" y2="44"></line>
          </svg></div>
      </div>
    </div>
  </div>
</div>