Home > Software engineering >  Ebay Class Change issue
Ebay Class Change issue

Time:02-17

I'm trying to pull the seller link from ebay uk. The current code below used to work fine, when it was using this class ("mbg"), now it still works but does not extract most of the urls, this is due to the CLASS change. I have tried several Class variations but nothing seems to work.

Can someone please have another look and ID the correct Class, as I said the current class does work and it was the old class, so the result currently are hit and miss, more miss. See image below

ebay image

Url - ebay image

<div  data-testid="x-about-this-seller">
  <div data-testid="ux-section-module" >
    <div >
      <div >
        <h2  id="ABOUT_THIS_SELLER_SECTION_MODULE0-0-1-2-title"><span >Seller information</span></h2>
      </div>
    </div>
    <div data-testid="ux-seller-section" >
      <div >
        <div >
          <div  data-testid="ux-seller-section__item--seller">
            <a href="https://www.ebay.co.uk/usr/sapphirelondonuk?_trksid=p2047675.m3561.l2559" data-testid="ux-action" _sp="p2047675.m3561.l2559" data-vi-tracking="{&quot;eventFamily&quot;:&quot;ITM&quot;,&quot;eventAction&quot;:&quot;ACTN&quot;,&quot;actionKind&quot;:&quot;CLICK&quot;,&quot;operationId&quot;:&quot;2047675&quot;,&quot;flushImmediately&quot;:false,&quot;eventProperty&quot;:{&quot;parentrq&quot;:&quot;efab2f12f8ce13e8&quot;,&quot;pageci&quot;:&quot;fe5eef83-63b4-4f4f-b6a8-afcb8e69891d&quot;,&quot;moduledtl&quot;:&quot;mi:3561|li:2559&quot;,&quot;sid&quot;:&quot;p2047675.m3561.l2559&quot;}}"><span >sapphirelondonuk</span></a><span> </span>
           

CodePudding user response:

Its ok I have worked it out its

 wsSheet.Cells(StartRow   myCounter, 2).Value = doc.getElementsByClassName("ux-seller-section__item")(0).getElementsByTagName("a")(0).href
  • Related