4 1
Sign in to rate

Japanese Definition Scraper from weblio Dictionary

<10kB. Updated 2019-12-17.


An Anki add-on, based on the Japanese Definitions for Korean Vocabulary add-on (which is based on Sanseido Definitions add-on), for adding Japanese definitions of Japanese vocabulary. It's primarily meant for learners who already had some grasp of Japanese. This add-on crawls Weblio's dictionary and scrapes the definition for each selected note. It also does a simple cleaning on the fetched definition to remove some useless text from weblio, for example the word's pronunciation and some external links. If you find any problem with the scraped definition, open an issue on github, please mention which word resulted in the undesired results. [Add example] Bugs and workarounds ~~It currently doesn't work if only one card is selected, see bug #9. But, it should work if another note or card is selected (it will hide the note fields at the bottom) before clicking on "Regenerate Japanese Definitions."~~ <br /> Fixed. Now, it works if a single card is selected. Requirements The add-on requires two fields: If you want to use different names to match your current note types, you can edit those values on Tools > Add-ons > Config. You need to restart Anki for the changes take effect. Usage Just select the card(s) you'd like to adjust in Anki's Browser and select Edit -> Regenerate Japanese definitions. Do note that each definition is pulled from Weblio's online dictionary, so if you're bulk-editting thousands of cards, this could take a while. It currently supports multi-threading, and by default up to 15 words are searched simultaneously. This value can be changed on Tools > Add-ons > Config, it is not necessary to restart Anki for the changes take effect. It doesn't seem to take too much of the CPU resources, and maybe it can still be increased depending on your PC processing power. But, be aware that a very high number can trigger weblio's DDoS protection and crash the results. For questions or support, please refer to this plugin's github page.


As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:


If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons


on 1625077868
If you get errors, it seems like its because weblio limits the number of searches you can do and has 10 minute cool down period before you can search again. That being said, this plugin is amazing. Next best sing since the Sanseido site went down, taking the sanseido plugin with it.
on 1608345153
I love this, it does give me a swath of errors when i use it but it still fills in like 70% of the words, good enough for me.
on 1589852936
Thanks a lot for this! I've recently started learning python and I was planning to make my personal Anki add-on to webscrape from weblio (i.e. more or less this, except I want the definitions to be a little bit more processed), so this was incredibly useful as a starting point.

update (answering author): I definitely did a little more than just change the way definitions are displayed. As I mentioned, my initial plan was to write the add-on from scratch, so I had some different features in mind, meant to help the way I make cards. For example, I set up my add-on to use the onFocusLost hook to read the content of a "Words" field, fetch the definitions, and post them in the "Meaning" field, similar to how the Japanese add-on adds furigana readings.
Another notable change I did was concerning subdefinitions (well, I say "change", but I think my current version only borrows ideas from yours, not actual code). For example, for a definition like 撮る, I believe your add-on treats "❶手に持つ。 《取・執》" and its subdefinition "①離れているものを手でつかんで持つ。手で握る。 「茶碗を手に-・って見る」 「書棚の本を-・る」 「ペンを-・る」" as if they were two separate definitions. My current version identifies one as a subdefinition of the other, and displays them with indentation to reflect this.

Anyway, my version is still work in progress (since the html on weblio is inconsistent, some definitions still don't display as I want them), but if you have interest I'm ok with sharing my version.
Comment from author
You are welcome.
If you will only modify the way the definitions are shown, please submit a pull request with them.
My idea was to just get the definition in bulk after adding them while reading with a browser add-on, and I didn't care too much about formatting the results, because I usually check them to see if they are useful or not.
I just uploaded this add-on, because the original one doesn't work for Anki 2.1, and since I already had the trouble of coding a bit, why not share it and see if it is useful for someone else.
When you think your code is good, please upload it to ankiweb.
on 1585399829
It works really well for me. Thanks the author.
Just one small suggestion.
For some Japanese vocabularies, the Kanjis are the same but the readings and usages are different.
Like 避ける has 2 reading, さける and よける.
And your add-on put explanation together so users cannot know which example sentence is read as さける or よける.
Comment from author
I didn't checked this page for some time, and I only saw your message now, because I was expecting that such suggestions/bug would be done on github.
I will take a look on it and it seems simple to fix it.
on 1584172256
Unfortunately, it doesn't work.
Comment from author
Sorry for taking so long to reply.
Can you provide more details by opening an issue on github?