|
Revision 1370, 429 bytes
(checked in by tokuhirom, 6 years ago)
|
|
Encode-JP-Mobile: added docomo unicode 2 japanese name scraping script.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/usr/bin/perl |
|---|
| 2 | use strict; |
|---|
| 3 | use warnings; |
|---|
| 4 | use Web::Scraper; |
|---|
| 5 | use URI; |
|---|
| 6 | use YAML; |
|---|
| 7 | |
|---|
| 8 | my $uri = URI->new( |
|---|
| 9 | "http://www.nttdocomo.co.jp/service/imode/make/content/pictograph/basic/index.html" |
|---|
| 10 | ); |
|---|
| 11 | my $scraper = scraper { |
|---|
| 12 | process 'tr', 'hoge[]', scraper { |
|---|
| 13 | process 'td:nth-child(5)', 'unicode', 'TEXT'; |
|---|
| 14 | process 'td:nth-child(6)', 'jpname', 'TEXT'; |
|---|
| 15 | }; |
|---|
| 16 | }; |
|---|
| 17 | my $result = $scraper->scrape($uri); |
|---|
| 18 | print Dump($result); |
|---|