脚本定位太多的类

时间:2016-12-29 23:42:41

标签: python selenium phantomjs

截图:https://gyazo.com/b36f58b8f066bd84f3d1bf941b9e3e31 - 特别注意pycharm输出,它显示4个结果。但是当我在html源码中ctrl + f时。只有3.这是如何产生的? 输入:

an = browser.find_elements_by_css_selector('#content > div.sidebar-layout > section > table > tbody > .dbaListing.listing.hasInsertionFee')


for i in an:
    print(i, '\n')

输出:(由于某种原因,我得到4分?这不是预期的......)

<selenium.webdriver.remote.webelement.WebElement (session="b0cda760-ce1d-11e6-8eeb-879135080997", element=":wdc:1483053765956")> 

<selenium.webdriver.remote.webelement.WebElement (session="b0cda760-ce1d-11e6-8eeb-879135080997", element=":wdc:1483053765957")> 

<selenium.webdriver.remote.webelement.WebElement (session="b0cda760-ce1d-11e6-8eeb-879135080997", element=":wdc:1483053765958")> 

<selenium.webdriver.remote.webelement.WebElement (session="b0cda760-ce1d-11e6-8eeb-879135080997", element=":wdc:1483053765959")> 

我的代码应该弄清楚html中有多少“.dbaListing.listing.hasInsertionFee”。我想要这个并不重要。但由于某种原因(请快速浏览一下截图,注意“.dbaListing.listing.hasInsertionFee”)由于某种原因,我总是得到4分。它一直找到4,即使显然只有3!

我已经在html中手动检查过,只有3个,如果有人可以对此进行解释,也许是修复。那会很棒。

页面的html :( ctrl + f,然后搜索“dbalisting listing hasinsertionfee”找到的地方)

    dataLayer.push(dbaContext);
</script><style type="text/css">:root DIV[id^="google-dfp-skyscraper"],
:root .gcsa,
:root .marketing-container,
:root .dbaListing.listing.cpcListing,
:root .banner.megaboard,
:root .banner.calculation-banners.clearfix,
:root .topBannerWrapper.expandableTopBannerWrapper,
:root .sekBannerTop.fixIeBox,
:root .banner.takeover.original,
:root .adslot.adslot-megaboard,
:root .adslot,
:root #content > #right > .dose > .dosesingle,
:root #content > #center > .dose > .dosesingle,
:root .placeholderAd,
:root .plainAd,
:root .player_ad,
:root .playerAd,
:root .player_page_ad_box,
:root .player_hover_ad,
:root .player-ads,
:root .playAds2,
:root .player_ad_box,
:root .player_ad2,
:root .placeholder-ad,
:root .ad-space,
:root .play-page-ads,
:root .player-under-ad
{display:none !important;}</style><style>img[src="//ad.doubleclick.net/ddm/ad/vgs63pq/58v/1gc2/v2h1wao/pt7xb/;ord=1483043976758?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483043976792"],
img[src="//ad.doubleclick.net/ddm/ad/2kmg/9qv2u6b/tsmv6dq/pdd0m/;ord=1483043977288?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483043977323"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483043981280"],
img[src="//ad.doubleclick.net/ddm/ad/457w1/5x7ipeg/vla3btcb8k/;ord=1483043981282?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483043981284"],
img[src="//ad.doubleclick.net/ddm/ad/y32/q3dhh060e80w/;ord=1483043981285?"],
img[src="//ad.doubleclick.net/ddm/ad/3ov7/vlgiif2zjoc/g4hbi/4hcbxyr5rj4/;ord=1483043981913?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483043982024"],
img[src="//ad.doubleclick.net/ddm/ad/yqaif2r05c0w/d47sp1la9/iduo928lyk/;ord=1483043982449?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483043982544"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483044011180"],
img[src="//ad.doubleclick.net/ddm/ad/tb1/9yfjk9xuf40/;ord=1483044011181?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483044011183"],
img[src="//ad.doubleclick.net/ddm/ad/tyn7qd/699spki1/;ord=1483044011183?"],
img[src="//ad.doubleclick.net/ddm/ad/8c1m702m2g/umihf/kk83i2ihh4/47m8/;ord=1483044014540?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483044014574"],
img[src="//ad.doubleclick.net/ddm/ad/clf514fcx/2a89pt/;ord=1483044015056?"],
img[src="//0914.global.ssl.fastly.net/ad/img/x.gif?cb=1483044015099"]
{display:none !important;}</style>



    <script src="http://dbastatic.dk/Content/scripts/lib/modernizr.custom.js?2.0.0.0-648b216" charset="utf-8"></script>


        <script src="http://dbastatic.dk/RequestReduceContent/a6707d2f967132894f56933b0362b159-aa81bb596e42a9896f0a42315fcc739c-RequestReducedScript.js" type="text/javascript"></script>
<style type="text/css" id="qual_style-fp"></style><style type="text/css" id="qual_style-fq"></style></head>
<body class="fixed">
<script data-script="TagManagerScript">
    (function (w, d, s, l, i) {
        w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
        var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
        j.async = true;
        j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl;
        f.parentNode.insertBefore(j, f);
    })(window, document, 'script', 'dataLayer', 'GTM-XS9J');
</script>





<div id="page">




<header id="defaultHeader">
    <div class="container">
        <b class="logo"><a href="http://www.dba.dk" title="Nyt og brugt, køb og salg på DBA - Danmarks største handelsportal">Køb og sælg både nye og brugte nye varer på DBA – du finder over 1 mio. billige ting til salg.</a></b>
        <nav class="nav-top">
            <ul class="unstyled">


    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel" data-bind="foreach: items">
        <li data-bind="css: {read: Read}" class="">
            <a tabindex="-1" href="http://www.dba.dk/produkt-tilvalg/?id=1029751995&amp;produktId=1" data-bind="attr: {href: Url, 'data-ga-lbl': $parent.itemLabel($data)}" class="trackClicks" data-ga-act="NotificationInboxItemClick" data-ga-lbl="upsell-unread">
                <i class="svg-icon-14 svg-upsell" data-bind="css: $parent.icon(Type)"></i> <small class="muted when" data-bind="text: TimeText">20. december</small>  <span data-bind="text: Text">Din annonce 'Tastatur, Mad Catz, Strike 7' er på side 32. Kom øverst i rubrikken.</span>
            </a>
        </li>
        <li class="divider" data-bind="visible: $parent.showDivider($index)" style="display: none;"></li>
    </ul>
</div>

</li>
                <li><a href="https://guide.dba.dk" target="_blank" data-ga-act="dba-blog" data-ga-lbl="header" class="trackClicks">DBA Guide</a></li>

                <li><a href="http://www.dba.dk/aspsite/support/" data-ga-act="hjaelp" data-ga-lbl="header" class="trackClicks">Hjælp</a></li>


                    <button class="btn btn-large btn-search" type="submit"><span class="icon"></span>Søg</button>
                        <ul class="dropdown-menu" role="menu" data-bind="template {name: template(), foreach: dropdown}, css: {latest: template() === 'latest'}"></ul>
    <script type="text/template" id="latest">
                <li data-bind="css: {disabled: IsEmpty}">
                    <a tabindex="-1" href="#" data-bind="attr: {href: Url, 'data-ga-lbl': 'link-' + ($index() + 1) }" class="trackClicks" data-ga-act="recent-search-query-clicked">
                        <small class="badge pull-right" data-bind="text: Results"></small>
                        <span data-bind="text: Query"></span>
                    </a>
                </li>
    </script>
    <script type="text/template" id="predictive">
        <li>
            <a tabindex="-1" href="#" data-bind="attr: {href: Url, 'data-ga-lbl': 'link-' + ($index() + 1) }" class="trackClicks" data-ga-act="predictive-search-clicked">
                <small class="badge pull-right" data-bind="text: Hits"></small>
                <strong data-bind="text: Name"></strong>
                <small class="sub-text muted" data-bind="text: PlacementDisplayText"></small>
            </a>
        </li>
    </script>

                </div>
            </form>
            <div class="header-actions">
                <div id="mydba-menu" class="dropdown-header pull-right">

                    <div class="btn-group"><a href="/min-dbadk/" data-ga-act="min-dba" data-ga-lbl="header" class="btn btn-large btn-menu trackClicks">Min DBA</a>    <button class="dropdown-toggle btn btn-large btn-menu" data-toggle="dropdown">
        <span class="caret"></span>
    </button>
<ul class="dropdown-menu"><li><a href="/min-dbadk/mine-annoncer/" data-ga-act="mine-annoncer" data-ga-lbl="header" class="trackClicks">Mine annoncer<span data-bind="{text:QuestionsAndAnswersCounts().SumNewListingPostCountOwnListings, visible: QuestionsAndAnswersCounts().SumNewListingPostCountOwnListings > 0 }" title="Der er nye indlæg i Spørgsmål og svar" class="badge badge-important" style="display:none">0</span></a></li><li><a href="/min-dbadk/favoritter/" data-ga-act="gemte-annoncer" data-ga-lbl="header" class="trackClicks">Favoritter<span data-bind="{text:QuestionsAndAnswersCounts().SumNewListingPostCountOtherListings, visible: QuestionsAndAnswersCounts().SumNewListingPostCountOtherListings > 0 }" title="Der er nye indlæg i Spørgsmål og svar" class="badge badge-important" style="display:none">0</span></a></li>        <li><a href="/min-dbadk/saelgere-jeg-foelger/" data-ga-act="navigate-to-followee-list" data-ga-lbl="social" class="trackClicks">Sælgere du følger</a></li>
        <li><a href="/min-dbadk/gemte-soegninger/">Gemte søgninger</a></li>
    <li><a href="/min-dbadk/mine-brugeroplysninger/" data-ga-act="mine-brugeroplysninger" data-ga-lbl="header" class="trackClicks">Mine brugeroplysninger</a></li>
    <li><a href="/min-dbadk/e-mails/" data-ga-act="administrer-emails" data-ga-lbl="header" class="trackClicks">Administrer e-mails</a></li>
    <li><a href="/min-dbadk/betalinger/" data-ga-act="blaa-konto" data-ga-lbl="header" class="trackClicks">Betalinger</a></li>
        <li><a href="/fragt/" data-ga-act="shipping-landing-page" data-ga-lbl="header" class="trackClicks">Køb pakkelabel</a></li>
<li><a href="/log-ud/" id="signout" data-ga-act="logout" data-ga-lbl="header">Log ud<small data-bind="{text:UserNameFormatted}"> (sebastian)</small></a></li></ul></div>
                </div>
                <div id="syi-create" class="dropdown-call-to-action pull-right">
                    <a href="/opret-annonce/" title="Sæt dine ting til salg her" data-ga-act="PostAdBegin" data-ga-lbl="header" id="syi-btn" class="btn btn-large btn-call-to-action trackClicks">Opret annonce</a>
                </div>
            </div>
        </div>
    </div>
</header>











    <nav class="breadcrumb">
        <ul class=" container">
            <li><a href="http://www.dba.dk" title="Nyt og brugt, køb og salg på DBA - Danmarks største handelsportal">Forside</a></li>
            <li>
                <a href="/min-dbadk/">Min DBA</a>
            </li>
            <li>Mine annoncer</li>
        </ul>
    </nav>


    <div role="main" id="content" class="container">





<div class="top">
    <div class="chat-support clearfix">
    <div id="chatPlaceholder" class="pull-right">
        <a href="http://www.dba.dk/aspsite/support/" target="_blank" data-bind="html: liveChatText, click: handle"><span class="tag tag-online">Live!</span> Chat med support</a>
    </div>
</div>



</div>

<div class="sidebar-layout">
    <aside class="sidebar sidebar-left">

<div class="mydba-menu">
<h3>
    Min DBA <small style="display:inline-block">sebastian nielsen</small>
</h3>
<ul>

    <li class="active">
        <span>
        Mine annoncer

            <small>( 4 )</small>


    </span>
    </li>

    <li>
        <a href="/min-dbadk/favoritter/">
            Favoritter

                <small>( 0 )</small>


        </a>
    </li>

    <li>
        <a href="/min-dbadk/saelgere-jeg-foelger/">
            Sælgere du følger


        </a>
    </li>

    <li>
        <a href="/min-dbadk/gemte-soegninger/">
            Gemte søgninger


        </a>
    </li>

    <li>
        <a href="/min-dbadk/mine-brugeroplysninger/">
            Mine brugeroplysninger


        </a>
    </li>

    <li>
        <a href="/min-dbadk/skift-adgangskode/">
            Skift adgangskode


        </a>
    </li>

    <li>
        <a href="/min-dbadk/e-mails/">
            Administrer e-mails


        </a>
    </li>

    <li>
        <a href="/min-dbadk/betalinger/">
            Betalinger


        </a>
    </li>

    <li>
        <a href="/fragt/" data-ga-cat="MyDba" data-ga-act="shipping-landing-page" data-ga-lbl="shipping" class="trackClicks">
            Køb pakkelabel


        </a>
    </li>

</ul>
</div>
    </aside>
    <section class="content sidebar-left">

        <div class="marketing-container">
            <div id="google-dfp-marketing" class="adslot" data-adslot="{&quot;bids&quot;:null,&quot;adSlotId&quot;:&quot;google-dfp-marketing&quot;,&quot;sizes&quot;:[[700,160]],&quot;targeting&quot;:[{&quot;key&quot;:&quot;position&quot;,&quot;values&quot;:[&quot;marketing&quot;],&quot;isEmpty&quot;:false}],&quot;collapse&quot;:false}"></div>



        </div>






<div class="tabs">
    <ul>

        <li class="current">
            <div class="a">
                <span>
                    Mine annoncer

                    <small>
                        ( 4 )</small>

                </span>
            </div>
        </li>

        <li><a href="/min-dbadk/mine-annoncer/aktive-annoncer/"><span>
            Kun aktive annoncer

            <small>
                ( 4 )</small>

        </span></a></li>

        <li>
            <div class="a">
                <span>
                    Kun inaktive annoncer

                    <small>
                        ( 0 )</small>

                </span>
            </div>
        </li>

    </ul>
</div>

<input name="__RequestVerificationToken" type="hidden" value="CDVIQEr_BGF3LlXewKgXuRn5QT71jlSNckiVD5C6w5j_qqKOOgZOyiWqsef9zAv5uupa7l1Yx_c7d5fL_8bUTG7CQKxnOoMXHbLHxf5Dd5JYldvEmI4ZaSqgAw22mcTAQWtVJQ2">

    <table class="searchResults srpListView">
        <thead class="sorting">
            <tr>
                <th class="noWrap" colspan="3">Annonce</th>
                <th class="noWrap">Besøg
                </th>
                <th class="noWrap">Tid tilbage
                </th>
                <th class="noWrap">Favoritter</th>
                <th></th>
                <th></th>
                <th></th>
            </tr>
        </thead>
        <tbody>


<tr class="dbaListing listing hasInsertionFee">

    <td class="pictureColumn" colspan="1">
        <div class="thumbnailContainer">
            <a class="thumbnailContainerInner" href="http://www.dba.dk/tastatur-mad-catz-strike-7/id-1029751995/">

            <img class="thumbnail lazy image-placeholder" alt="Tastatur, Mad Catz, Strike 7, Perfekt, Den er helt ny, stadig i fuld indpakning. 

Hvorfor sælger jeg?
Jeg opdagede at jeg havde skaffet det forkerte tastetur, der var ment som gave. Og siden at jeg havde ventet for længe med at få den byttet, var det altså for sent. Derfor sælger jeg den så for 1900 kr. (300 mindre en nypris)

Den er virkelig alle pengene værd, og har så mange funktioner, at jeg aldrig kan komme tæt på at beskrive alt her. Derfor hvis i er interesserede i den kan i..." data-original="http://dbastatic.dk/pictures/pictures/3d/05/e060-37f5-4465-af3e-d20e730a9853.jpg?preset=srpgallery" src="http://dbastatic.dk/pictures/pictures/3d/05/e060-37f5-4465-af3e-d20e730a9853.jpg?preset=srpgallery" style="display: block;">
            </a>
        </div>
    </td>

<td class="mainContent" colspan="2">
    <script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "Product",
        "name": "Tastatur, Mad Catz, Strike 7, Perfekt, Den er...",
        "image": "http://dbastatic.dk/pictures/pictures/3d/05/e060-37f5-4465-af3e-d20e730a9853.jpg?preset=medium",
        "url": "http://www.dba.dk/tastatur-mad-catz-strike-7/id-1029751995/",
        "offers": {
            "@type": "Offer",
            "priceCurrency": "DKK",
            "price": "1900"
        }
    }
    </script>

    <a class="listingLink" href="http://www.dba.dk/tastatur-mad-catz-strike-7/id-1029751995/">
            <span class="headline-block">
                            </span>

    </a>

    <div class="expandable-box expandable-box-collapsed">
        <a class="listingLink" href="http://www.dba.dk/tastatur-mad-catz-strike-7/id-1029751995/">Tastatur, Mad Catz, Strike 7, Perfekt, Den er helt ny, stadig i fuld indpakning. 

Hvorfor sælger jeg?
Jeg opdagede at jeg havde skaffet det forkerte tastetur, der var ment som gave. Og siden at jeg havde ventet for længe med at få den byttet, var det altså for sent. Derfor sælger jeg den så for 1900 kr. (300 mindre en nypris)

Den er virkelig alle pengene værd, og har så mange funktioner, at jeg aldrig kan komme tæt på at beskrive alt her. Derfor hvis i er interesserede i den kan i...</a>
        <a class="link-to-listing" href="http://www.dba.dk/tastatur-mad-catz-strike-7/id-1029751995/">Se hele annoncen</a>
    </div>


<ul class="details">

    <li>


<span>1.900 kr.</span>
    </li>

</ul>

</td>




                <td>

<span>116</span></td>
                <td>

<span>10 dage</span></td>
                <td>0</td>
                <td>

        <div class="listingUpselling bump-up-upsell">
            <p>
                Er nu på side <b>55</b>.
            </p>
            <p><a href="/produkt-tilvalg/?id=1029751995&amp;produktId=BumpUp&amp;returnUrl=http%3A%2F%2Fwww.dba.dk%2Fmin-dbadk%2Fmine-annoncer%2F" rel="nofollow" data-ga-act="bumpup-upsell-page-number-click" data-ga-lbl="tenzing-project" class="upsellingButton btn btn-small trackClicks">Køb oprykning</a></p>
        </div>

</td>
<td class="noWrap myDbaActions">
    <ul class="unstyled">
            <li>
                <a href="/rediger-annonce/?id=1029751995" data-ga-act="EditAdBegin" data-ga-lbl="" class="trackClicks">Rediger</a>
            </li>


            <li>
                <a href="#" onclick="Dba.MyDba.MyListings.inactivateListing('/ajax/my-dba/MyDba/InActivateListing', 1029751995); return false; ">Deaktiver</a>
            </li>

        <li>
            <a href="#" data-ga-act="DeleteAdBegin" data-ga-lbl="" onclick="Dba.MyDba.MyListings.deleteListing('/ajax/my-dba/MyDba/DeleteListing', 1029751995); return false;" class="trackClicks">Slet</a>
        </li>


            <li>
                <a href="/paypal/anmodning/?externalid=1029751995" data-ga-act="click" data-ga-lbl="paypal-request-payment" class="trackClicks">Start PayPal</a>
            </li>

            <li>
                <a href="/fragt/1029751995/" data-ga-act="shipping-buy-label" data-ga-lbl="shipping" class="trackClicks">Køb pakkelabel</a>
            </li>
    </ul>
</td>
                </tr>  


<tr class="dbaListing listing hasInsertionFee">

    <td class="pictureColumn" colspan="1">
        <div class="thumbnailContainer">
            <a class="thumbnailContainerInner" href="http://www.dba.dk/dykkerur-akribos-xxiv-test/id-1030155633/">

            <img class="thumbnail lazy image-placeholder" alt="Dykkerur, Akribos XXIV, test" data-original="http://dbastatic.dk/pictures/pictures/41/0d/7053-631b-4ba6-b520-cb0cbdd67b29.jpg?preset=srpgallery" src="http://dbastatic.dk/pictures/pictures/41/0d/7053-631b-4ba6-b520-cb0cbdd67b29.jpg?preset=srpgallery" style="display: block;">
            </a>
        </div>
    </td>

<td class="mainContent" colspan="2">
    <script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "Product",
        "name": "Dykkerur, Akribos XXIV, test",
        "image": "http://dbastatic.dk/pictures/pictures/41/0d/7053-631b-4ba6-b520-cb0cbdd67b29.jpg?preset=medium",
        "url": "http://www.dba.dk/dykkerur-akribos-xxiv-test/id-1030155633/",
        "offers": {
            "@type": "Offer",
            "priceCurrency": "DKK",
            "price": "9999"
        }
    }
    </script>

    <a class="listingLink" href="http://www.dba.dk/dykkerur-akribos-xxiv-test/id-1030155633/">
            <span class="headline-block">
                            </span>

    </a>

    <div class="expandable-box expandable-box-collapsed">
        <a class="listingLink" href="http://www.dba.dk/dykkerur-akribos-xxiv-test/id-1030155633/">Dykkerur, Akribos XXIV, test</a>
        <a class="link-to-listing" href="http://www.dba.dk/dykkerur-akribos-xxiv-test/id-1030155633/">Se hele annoncen</a>
    </div>


<ul class="details">

    <li>


<span>9.999 kr.</span>
    </li>

</ul>

</td>




                <td>

<span>18</span></td>
                <td>

<span>29 dage</span></td>
                <td>0</td>
                <td>

        <div class="listingUpselling top-listing-upsell">
            <p>
                Få din annonce på side 1 i 3 dage.
            </p>
            <p><a href="/produkt-tilvalg/?id=1030155633&amp;produktId=TopListing&amp;returnUrl=http%3A%2F%2Fwww.dba.dk%2Fmin-dbadk%2Fmine-annoncer%2F" rel="nofollow" data-ga-act="top-listing-upsell-click" data-ga-lbl="tenzing-project" class="upsellingButton btn btn-small trackClicks">Køb topannonce</a></p>
        </div>

</td>
<td class="noWrap myDbaActions">
    <ul class="unstyled">
            <li>
                <a href="/rediger-annonce/?id=1030155633" data-ga-act="EditAdBegin" data-ga-lbl="" class="trackClicks">Rediger</a>
            </li>


            <li>
                <a href="#" onclick="Dba.MyDba.MyListings.inactivateListing('/ajax/my-dba/MyDba/InActivateListing', 1030155633); return false; ">Deaktiver</a>
            </li>

        <li>
            <a href="#" data-ga-act="DeleteAdBegin" data-ga-lbl="" onclick="Dba.MyDba.MyListings.deleteListing('/ajax/my-dba/MyDba/DeleteListing', 1030155633); return false;" class="trackClicks">Slet</a>
        </li>


            <li>
                <a href="/paypal/anmodning/?externalid=1030155633" data-ga-act="click" data-ga-lbl="paypal-request-payment" class="trackClicks">Start PayPal</a>
            </li>

            <li>
                <a href="/fragt/1030155633/" data-ga-act="shipping-buy-label" data-ga-lbl="shipping" class="trackClicks">Køb pakkelabel</a>
            </li>
    </ul>
</td>
                </tr>  


<tr class="dbaListing listing hasInsertionFee">

    <td class="pictureColumn" colspan="1">
        <div class="thumbnailContainer">
            <a class="thumbnailContainerInner" href="http://www.dba.dk/dykkerur-adidas-test/id-1030155766/">

            <img class="thumbnail lazy image-placeholder" alt="Dykkerur, Adidas, test" data-original="http://dbastatic.dk/pictures/pictures/6d/45/bee3-8bb7-4e0b-9cb4-4c75ebea7ac2.jpg?preset=srpgallery" src="http://dbastatic.dk/pictures/pictures/6d/45/bee3-8bb7-4e0b-9cb4-4c75ebea7ac2.jpg?preset=srpgallery" style="display: block;">
            </a>
        </div>
    </td>

<td class="mainContent" colspan="2">
    <script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "Product",
        "name": "Dykkerur, Adidas, test",
        "image": "http://dbastatic.dk/pictures/pictures/6d/45/bee3-8bb7-4e0b-9cb4-4c75ebea7ac2.jpg?preset=medium",
        "url": "http://www.dba.dk/dykkerur-adidas-test/id-1030155766/",
        "offers": {
            "@type": "Offer",
            "priceCurrency": "DKK",
            "price": "9999"
        }
    }
    </script>

    <a class="listingLink" href="http://www.dba.dk/dykkerur-adidas-test/id-1030155766/">
            <span class="headline-block">
                            </span>

    </a>

    <div class="expandable-box expandable-box-collapsed">
        <a class="listingLink" href="http://www.dba.dk/dykkerur-adidas-test/id-1030155766/">Dykkerur, Adidas, test</a>
        <a class="link-to-listing" href="http://www.dba.dk/dykkerur-adidas-test/id-1030155766/">Se hele annoncen</a>
    </div>


<ul class="details">

    <li>


<span>9.999 kr.</span>
    </li>

</ul>

</td>




                <td>

<span>14</span></td>
                <td>

<span>29 dage</span></td>
                <td>0</td>
                <td>

        <div class="listingUpselling top-listing-upsell">
            <p>
                Få din annonce på side 1 i 3 dage.
            </p>
            <p><a href="/produkt-tilvalg/?id=1030155766&amp;produktId=TopListing&amp;returnUrl=http%3A%2F%2Fwww.dba.dk%2Fmin-dbadk%2Fmine-annoncer%2F" rel="nofollow" data-ga-act="top-listing-upsell-click" data-ga-lbl="tenzing-project" class="upsellingButton btn btn-small trackClicks">Køb topannonce</a></p>
        </div>

</td>
<td class="noWrap myDbaActions">
    <ul class="unstyled">
            <li>
                <a href="/rediger-annonce/?id=1030155766" data-ga-act="EditAdBegin" data-ga-lbl="" class="trackClicks">Rediger</a>
            </li>


            <li>
                <a href="#" onclick="Dba.MyDba.MyListings.inactivateListing('/ajax/my-dba/MyDba/InActivateListing', 1030155766); return false; ">Deaktiver</a>
            </li>

        <li>
            <a href="#" data-ga-act="DeleteAdBegin" data-ga-lbl="" onclick="Dba.MyDba.MyListings.deleteListing('/ajax/my-dba/MyDba/DeleteListing', 1030155766); return false;" class="trackClicks">Slet</a>
        </li>


            <li>
                <a href="/paypal/anmodning/?externalid=1030155766" data-ga-act="click" data-ga-lbl="paypal-request-payment" class="trackClicks">Start PayPal</a>
            </li>

            <li>
                <a href="/fragt/1030155766/" data-ga-act="shipping-buy-label" data-ga-lbl="shipping" class="trackClicks">Køb pakkelabel</a>
            </li>
    </ul>
</td>
                </tr>  


<tr class="dbaListing listing lastListing hasInsertionFee">

    <td class="pictureColumn" colspan="1">
        <div class="thumbnailContainer">
            <a class="thumbnailContainerInner" href="http://www.dba.dk/joystick-l-h-defekt-test/id-1030156328/">

1 个答案:

答案 0 :(得分:0)

在您的示例html文件的底部是一个条目:

<tr class="dbaListing listing lastListing hasInsertionFee">

您的代码正在考虑匹配,即4。