By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

I need to extract the number of google plus likes with javascript

P: 2
Hello, I need to extract the number of google plus likes of some pages, for example bytes.com

the number is here:

https://plusone.google.com/u/0/_/%2B1/fastbutton?count=true&url=http://www.bytes.com/


When you look at the html, you see much text and this:

window.__SSR = {c: 6.0 ,

the number after c: is 6.0, which is the number of likes.

But I don't know how to get this number..
I need it as javascript variable, because this will be used in other javascript functions of my website.

Small working example?
thanks
Feb 23 '12 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
Small working example?
what have you tried?
Feb 23 '12 #2

P: 2
Usually I have used local Javascript functions. But in that case I don't even know how to save the html code of this website in a variable. Then I could try to extract this number.

The problem is, I don't know how to start.
Feb 23 '12 #3

Dormilich
Expert Mod 5K+
P: 8,639
the first thing to do is getting the page's source code in text form.
Feb 24 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.