Ebay Class 更改问题
Ebay Class Change issue
我正在尝试从 ebay 英国拉卖家 link。下面的当前代码在使用此 class ("mbg") 时工作正常,现在它仍然可以工作但不会提取大部分 url,这是由于 CLASS 更改。我尝试了几种 Class 变体,但似乎没有任何效果。
谁能再看一眼并识别正确的 Class,正如我所说,当前的 class 确实有效,它是旧的 class,所以目前的结果是正确的想念,更多的想念。见下图
Url - Ebay Product Link
counter = 0
For Each link In varLinks
DoEvents
Set doc = NewHTMLDocument(CStr(link))
If doc.getElementsByClassName("mbg")(0) Is Nothing Then
wsSheet.Cells(StartRow + myCounter, 2).Value = "-"
Else
wsSheet.Cells(StartRow + myCounter, 2).Value = doc.getElementsByClassName("mbg")(0).Children(0).href
End If
<div class="vim x-about-this-seller" data-testid="x-about-this-seller">
<div data-testid="ux-section-module" class="ux-section-module">
<div class="section-title">
<div class="section-title__title-container">
<h2 class="section-title__title" id="ABOUT_THIS_SELLER_SECTION_MODULE0-0-1-2-title"><span class="ux-textspans--BOLD">Seller information</span></h2>
</div>
</div>
<div data-testid="ux-seller-section" class="ux-seller-section">
<div class="ux-seller-section__content">
<div class="ux-seller-section__item">
<div class="ux-seller-section__item--seller" 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="{"eventFamily":"ITM","eventAction":"ACTN","actionKind":"CLICK","operationId":"2047675","flushImmediately":false,"eventProperty":{"parentrq":"efab2f12f8ce13e8","pageci":"fe5eef83-63b4-4f4f-b6a8-afcb8e69891d","moduledtl":"mi:3561|li:2559","sid":"p2047675.m3561.l2559"}}"><span class="ux-textspans--PSEUDOLINK ux-textspans--BOLD">sapphirelondonuk</span></a><span> </span>
没关系我已经解决了
wsSheet.Cells(StartRow + myCounter, 2).Value = doc.getElementsByClassName("ux-seller-section__item")(0).getElementsByTagName("a")(0).href
我正在尝试从 ebay 英国拉卖家 link。下面的当前代码在使用此 class ("mbg") 时工作正常,现在它仍然可以工作但不会提取大部分 url,这是由于 CLASS 更改。我尝试了几种 Class 变体,但似乎没有任何效果。
谁能再看一眼并识别正确的 Class,正如我所说,当前的 class 确实有效,它是旧的 class,所以目前的结果是正确的想念,更多的想念。见下图
Url - Ebay Product Link
counter = 0
For Each link In varLinks
DoEvents
Set doc = NewHTMLDocument(CStr(link))
If doc.getElementsByClassName("mbg")(0) Is Nothing Then
wsSheet.Cells(StartRow + myCounter, 2).Value = "-"
Else
wsSheet.Cells(StartRow + myCounter, 2).Value = doc.getElementsByClassName("mbg")(0).Children(0).href
End If
<div class="vim x-about-this-seller" data-testid="x-about-this-seller">
<div data-testid="ux-section-module" class="ux-section-module">
<div class="section-title">
<div class="section-title__title-container">
<h2 class="section-title__title" id="ABOUT_THIS_SELLER_SECTION_MODULE0-0-1-2-title"><span class="ux-textspans--BOLD">Seller information</span></h2>
</div>
</div>
<div data-testid="ux-seller-section" class="ux-seller-section">
<div class="ux-seller-section__content">
<div class="ux-seller-section__item">
<div class="ux-seller-section__item--seller" 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="{"eventFamily":"ITM","eventAction":"ACTN","actionKind":"CLICK","operationId":"2047675","flushImmediately":false,"eventProperty":{"parentrq":"efab2f12f8ce13e8","pageci":"fe5eef83-63b4-4f4f-b6a8-afcb8e69891d","moduledtl":"mi:3561|li:2559","sid":"p2047675.m3561.l2559"}}"><span class="ux-textspans--PSEUDOLINK ux-textspans--BOLD">sapphirelondonuk</span></a><span> </span>
没关系我已经解决了
wsSheet.Cells(StartRow + myCounter, 2).Value = doc.getElementsByClassName("ux-seller-section__item")(0).getElementsByTagName("a")(0).href