Input: wget -qO- http://runescape.com/community | grep -i playerCount
Output: <li class="header-top__right-option"><strong id="playerCount">0</strong> Online</li>
In browser:
Using cygwin..I am trying to use wget to pull a number out of a webpage. As shown in the example above, the playerCount is 0. If you actually load the webpage up and look at the same code, it is a completely different number. How can I get the real number? I was told it may be something with cookies or a user agent. This just started not working a few weeks ago.
That value appears to be filled in via javascript (though I can't find the request at a quick glance). If that's the case then you cannot get it with something like
wget
orcurl
in this way. You would need to find the specific request and send that.Given the URL indicated by aadarshs (which I saw but mistested when I looked at it the first time) something like this should work.