2004 Election Results: Data Gathering Script
- user warning: Table 'nolan.comments' doesn't exist
query: SELECT COUNT(*) FROM comments WHERE nid = 65 AND status = 0 in /home/sneakin/web/nolan.eakins.net/includes/database.mysql.inc on line 120.
- user warning: Table 'nolan.comments' doesn't exist
query: SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.picture, u.data, c.score, c.users, c.thread, c.status FROM comments c INNER JOIN users u ON c.uid = u.uid WHERE c.nid = 65 AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.thread, c.status ORDER BY c.thread DESC LIMIT 0, 50 in /home/sneakin/web/nolan.eakins.net/includes/database.mysql.inc on line 120.
Submitted by sneakin on Wed, 2004/11/03 - 09:51.
Politics | Programming
I wrote a Python script to collect the data from CNN.com. I would post the data, but it's probably copyrighted by CNN so I'm posting the script I used to gather it. All you need to do is run it, and it'll go through all 51 pages on CNN's site ripping the election results from each page. The data is then stored in 'election.txt' which is a tab delimited file that can be loaded in any decent spread sheet program.
The script can be downloaded here: http://www.semanticgap.com/scripts/cnn_results.txt
|