Skip to content

Instantly share code, notes, and snippets.

@lopnor
Created July 22, 2010 08:29
Show Gist options
  • Select an option

  • Save lopnor/485727 to your computer and use it in GitHub Desktop.

Select an option

Save lopnor/485727 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
use lib 'lib';
use BrowseNodeLookup;
use Config::Pit;
binmode(STDOUT, ':utf8');
my $conf = pit_get('amazon.co.jp');
my $lookup = BrowseNodeLookup->new($conf);
recur('465392');
sub recur {
my $nodeid = shift;
my $res = $lookup->lookup($nodeid, 'BrowseNodeInfo');
for ( @$res ) {
printf("%s\t%s\n", $_->{BrowseNodeId}, $_->{Name});
recur($_->{BrowseNodeId});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment