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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gulo
    New Member
    • Feb 2012
    • 2

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

    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?coun t=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
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    Small working example?
    what have you tried?

    Comment

    • Gulo
      New Member
      • Feb 2012
      • 2

      #3
      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.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        the first thing to do is getting the page's source code in text form.

        Comment

        Working...