Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to submit a poll in Javascript using curl and get the results?
    primarykey
    data
    text
    <p>Here's my problem: I was asked to develop a script that grabs the percentage of votes a certain artist has on Q102's Jingle Ball page, parses it and tweets the current percentage, along with the name of the artist. The API to tweet is done in AppleScript and it already tweets a custom string I pass to it. The only thing I need now is to get the values to build the string.</p> <p>Now, I tried doing a simple curl like this via Terminal:</p> <pre><code>curl http://www.q102.com/pages/jb-brackets/ </code></pre> <p>The problem is, in any poll, it doesn't even get the input types when I curl (they're radio buttons if you visit the page and try and vote), it just shows this for an artist when I curl'ed it (each poll has a specific ID - this is the poll that contains the data I need to get). </p> <pre><code> &lt;tr&gt; &lt;td rowspan="3" class="poll-left"&gt;&lt;p&gt;&lt;b&gt;Demi Lovato vs. &lt;br&gt; Avril Lavigne&lt;/b&gt;&lt;/p&gt; &lt;div id="start_poll_203988"&gt;&lt;/div&gt; &lt;div id="poll_203988"&gt;&lt;/div&gt; &lt;div id="stop_poll_203988"&gt; &lt;script language="javascript"&gt; //&lt;![CDATA[ insertPoll2('203988'); //]]&gt; &lt;/script&gt; </code></pre> <p>When you vote for a certain artist, and press 'Vote', it shows you the current percentage of votes, like so:</p> <p>Demi Lovato vs. Avril Lavigne</p> <p>Demi Lovato 49.88 %</p> <p>Avril Lavigne 50.12 %</p> <p>What I need to do is submit a vote, and get the value, because the stats only show up AFTER I submit the vote (on the main page). The page doesn't refresh after you vote. Basically, all I need is '49.88%' and '50.12%' (these stats vary, obviously).</p> <p>Is there any way to do this with curl/something else?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload