

Japanese Definition Scraper from weblio Dictionary
<10kB. Updated 2019-12-17. Only supports Anki 2.1.x.
Description
Download
As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.
To download this add-on, please copy and paste the following code into Anki 2.1:
2055037404
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.
Reviews

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.

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.

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.
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.
Update:
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.
If you will only modify the way the definitions are shown, please submit a pull request with them.
Update:
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.

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 よける.
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.
I will take a look on it and it seems simple to fix it.

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?
Can you provide more details by opening an issue on github?