• Explore Vox
  • Culture
  • Entertainment
  • Life
  • Music
  • News & Politics
  • Technology
  • Join Vox
  • Take a Tour
  • Already a Member? Sign in
bayashi

bayashi

hello again!

  • bayashi’s Blog
  • Profile
  • Neighbors
  • Photos
  • More 
    • Audio
    • Videos
    • Books
    • Links
    • Collections

Help me! i have a trouble using JSON in Perl

  • Oct 31, 2009
  • Post a comment

i had a error when i parsed JSON.
i am using module of the WebService::Simple to send request to Google Ajax Search API.


try below codes, for example.

#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use WebService::Simple;
use WebService::Simple::Parser::JSON;
use Data::Dumper;

my $q = 'ケーキ www.bob-an.com/recipe/OutputMain.asp?KeyNo=15711';

my $parser = WebService::Simple::Parser::JSON->new;
$parser->{json}->utf8(1);

my $google = WebService::Simple->new(
    base_url        => 'http://ajax.googleapis.com/ajax/services/search/web',
    response_parser => $parser,
    params          => {
        q     => $q,
        v     => '1.0',
        rsz   => 'large',
        lr    => 'lang_ja',
    },
);

my $req = $google->get;
my $res = $req->parse_response;

print Dumper($res);

 

this is the error.

illegal backslash escape sequence in string, at character offset 383 (before "\\\x{30af}\x{30ea}\x{30b9}...") at /usr/lib/perl5/site_perl/5.8.6/WebService/Simple/Parser/JSON.pm line 27. 

 

illegal backslash escape sequence...

 

if the query changed, it is alright.

my $q = 'www.bob-an.com/recipe/OutputMain.asp?KeyNo=15711'; 

 

why? why? why?

it seems bad around '</b>' i guessed.
however i can not solve it.


please, help me.

Post a comment Tags: perl, api, google, json

i have to hack my blog system.

  • Oct 24, 2009
  • Post a comment

someday, i wrote a blog post.
it's so long entry.
i wasted about 1 hour and more.


i just finished to write down the entry and push the post button.
but i had an error. it's too bad i edited the post time manually.
i quickly push the back button on browser, however the entry was gone away!
f*ck! i could not get entry back! please, give me my times back!


i was sulky and shutted down my computer and took a bath.
at the time, i had recalled that i hacked my blog system for such time.
all words insert into a clip board when the entry was posted.


i can get my entry back!
i thought so momentarily.
but i can not.


i gave up, and i shutted down my computer certainly.
Of course, clip board data was gone, of course,,,,


i have to hack my computer again to save words into the file instead of the clip board memory.
fmmmmm...

Post a comment Tags: blog

How to stay KOCHI in Japan

  • Sep 22, 2009
  • Post a comment

i went to KOCHI in Japan. there is my country. i love KOCHI, and tell you how to stay KOCHI in Japan.

Kochi is famous in the skipjack(KATSUO). it is very very very delicious and no expensive. and any restaurant presents same yumminess. because skipjack had cooked only roast. it so easy. KOCHI's skipjack is special.

you can select flavor sauce(TARE) or salt(SHIO). i recommend you to choice salt flavor. it's good. sauce is good too, but,,, you will feel delicious to eat SHIO skipjack with garlic slice.

KOCHI have other delicious material. fry of moray(UTSUBO), fry of GORI(is little fish in river), TENPURA of green seaweed(AONORI), etc. In any case, KOCHI is delicious.

do not forget to drink SAKE. i recommend you to choice brand of SAKE, TOSADURU or TAKIARASHI.

Come and Enjoy KOCHI. there are many temples like KYOTO.

 


 

Post a comment

Are you enjoying Tube8.com?

  • Jan 18, 2009
  • Post a comment

Tube8.com is exciting video-sharing site, you know.
I guess everybody wants to download awesome videos. But Tube8.com require to register...grrr...
Can I get a video without register?


Yes, we can!


You can get the video of Tube8.com when you use the bookmarklet below.

 

[ tube8.com video download bookmarklet ]

javascript:p=document.getElementsByTagName('html')[0].innerHTML.match(/var videourl="(http[^"]+\.flv)"/);location.href=RegExp.$1;

 

Can you use Perl on command line?


Then I recommend to use tube8_fetcher.pl (WWW::Tube8). It's very useful and easy!
See source file, you can see how to use the script. 

Download as much as you like!

 

 

Post a comment Tags: perl, javascript, bookmarklet, tube8.com
bayashi

About Me

bayashi
Japan
View my profile
Hello.

mine

  • Blog(lang-ja)

Archives

  • October 2009 (2)
  • September 2009 (1)
  • January 2009 (1)
  • 2009 (4)

Subscribe

  • Subscribe to a feed of these posts
  • Powered by Vox
  • Use this theme
  • Home
  • Explore
  • Tour Vox
  • Start a Vox Blog
Already a member? Sign in

Back to top

View Vox in your language: English | Español | Français | 日本語

Brought to you by Six Apart, creators of Movable Type, Vox and TypePad.
Six Apart Services: Blogs | Free Blogs | Content Management | Advertising

Vox © 2003-2008 Six Apart, Ltd. All Rights Reserved.
Help | Learn More | Terms of Service | Privacy Policy | Copyright | Advertise | Get a Free Vox Blog

Loading…

Adding this item will make it viewable to everyone who has access to the group.

Adding this post, and any items in it, will make it viewable to everyone who has access to the group.

Create a link to a person
Search all of Vox
Your Neighborhood
People on Vox

(Select up to five users maximum)

Vox Login

You've been logged out, please sign in to Vox with your email and password to complete this action.

Email:
Password:
 
Embed a Widget
Widget Title: This is optional
Widget Code: Insert outside code here to share media, slideshows, etc. Get more info
OK Cancel

We allow most HTML/CSS, <object> and <embed> code

Processing...
Processing
Message
Confirm
Error
Remove this member