Code Monkey home page Code Monkey logo

Comments (3)

xueyuanl avatar xueyuanl commented on July 17, 2024 2

Really appreciate for your great contribution. I ignored the None case when I did some refine works, and yes it's a serious problem in some situations.

from cambrinary.

CookiePPP avatar CookiePPP commented on July 17, 2024

checking the site
The final def-block ddef_block div is missing the def-body ddef_b so def_body is left as None.

<div class="def-block ddef_block " data-wl-senseid="CBED_00001451_06">
                        <div class="dwl hax">
        <a amp-access="loggedIn" amp-access-hide="" class="dwla wordlist-add-button" title="Add this meaning to a word list" on="tap:AMP.setState({ stateGlobal: { wlSenseId: 'CBED_00001451_06' } }), sidebarWordList.open">
            <i class="i i-plus" aria-hidden="true"></i>
            <i class="i i-list-ul"></i>
        </a>
        <a amp-access="NOT loggedIn" class="dwla wordlist-add-button" title="Add this meaning to a word list" on="tap:amp-access.login-sign-in">
            <i class="i i-plus" aria-hidden="true"></i>
            <i class="i i-list-ul"></i>
        </a>
    </div>
                <div class="ddef_h"><span class="def-info ddef-info">  <span class="lab dlab"><span class="region dregion">UK</span></span></span> <div class="def ddef_d db">if a <a class="query" href="https://dictionary.cambridge.org/dictionary/english/trade" title="trade">trade</a> <a class="query" href="https://dictionary.cambridge.org/dictionary/english/union" title="union">union</a> blacks <a class="query" href="https://dictionary.cambridge.org/dictionary/english/goods" title="goods">goods</a>, an <a class="query" href="https://dictionary.cambridge.org/dictionary/english/organization" title="organization">organization</a>, etc. it <a class="query" href="https://dictionary.cambridge.org/dictionary/english/refuse" title="refuses">refuses</a> to <a class="query" href="https://dictionary.cambridge.org/dictionary/english/deal" title="deal">deal</a> with them </div> </div></div>

I'll check if the HTML tree for this block is similar to the normal blocks, hopefully you can just add it to pad.find or ignore it.

from cambrinary.

CookiePPP avatar CookiePPP commented on July 17, 2024

Alright, was able to get it working by adding some if body is not None statements to the parse_trans, parse_example, parse_synonym funcs.

PR is here

from cambrinary.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.