- SEE ALSO
- COPYRIGHT & LICENCE
WWW::WWWJDIC - information about online Japanese dictionary WWWJDIC
use utf8; use WWW::WWWJDIC; my $wj = WWW::WWWJDIC->new (mirror => 'usa'); print $wj->lookup_url ('日本'), "\n";
(This example is included as synopsis.pl in the distribution.)
This documents WWW::WWWJDIC version 0.005 corresponding to git commit d12f085ac5039c3b3fec766b36c7995a022ce383 released on Tue Feb 13 09:32:00 2018 +0900.
Get information about the WWWJDIC online Japanese dictionaries.
my %mirrors = get_mirrors ();
Get a list of mirrors of WWWJDIC. The keys are arbitrary identifiers, and the values are the URLs of the mirrors. As of this version, the following sites are available:
my $wwwjdic = WWW::WWWJDIC->new (mirror => "japan")
Create the object which extracts the information from WWWJDIC.
The arguments are a hash with the following keys:
Please note that mirrors may change or go out of service, and new mirrors may be created. The above mirrors are obtained using the script boot/scrape-json.pl in the git repository. This script is not part of the CPAN distribution.
my $url = $wwwjdic->lookup_url ($key);
Make a lookup url (the "backdoor URL") which links to a WWWJDIC page. As of version 0.005, this URL goes to the combined dictionary page.
- WWWJDIC user guide
This is used by "lookup_url" to form the URL.
This is used to parse the information about WWWJDIC, which is internally stored in the JSON format.
Mirrors (including the main edrdg one) frequently go out of service.
The return value of "lookup_url" may become invalid as WWWJDIC's options are often changed so that different letters and numbers are used to indicate the various dictionaries.
There is no way to set the dictionary in "lookup_url".
There is no way to get the URL for the plain text output of WWWJDIC.
I started this module as a scraper for the WWWJDIC web site in around 2009. I released it to CPAN in 2017, but with documentation unwritten and with scraper code which no longer worked. Currently the only active use I have for this module is to get the list of mirrors. In version 0.003 I removed the scraper code, leaving only the method "lookup_url" and the function "get_mirrors".
Version 0.005 updates the mirror list to remove the Melbourne University and "gengo.com" mirrors.
Ben Bullock, <email@example.com>
This package and associated files are copyright (C) 2009-2018 Ben Bullock.
You can use, copy, modify and redistribute this package and associated files under the Perl Artistic Licence or the GNU General Public Licence.