Comments (3)
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.
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.
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)
- Error HOT 2
- Getting empty string using -t option HOT 1
- Error when searching for a definition HOT 4
- --translation chinese didn't work
- Please support Python3 HOT 2
- [Request] Add Turkish Lang. HOT 2
- Doesn't show definitions. HOT 3
- implement --synonym argument HOT 3
- Fails to suggest definitions everytime HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cambrinary.