I used a regular expression, it's simple...
code:
if(new RegExp(/\<a href=\"\/friend\/book\/displayManageBook\.do\"\>(\d+)\<\/a\>\<\/div\>/).exec(Content))
and change it for what you need, or you can search here if there's something that might help you:
MSDN