Automating collection of Twitter user stats
Posted on July 7, 2011Nasty little hack, but it works.
- Download Curl
- Download the OpenSLL DLL’s
- Create your text file with the list of Twitter accounts you want, one line per account (twits.txt)
- Create your batch file in the same folder as the above 3, just the following 2 lines needed (doit.bat)
- DEL out.xml
- FOR /F %%i IN (twits.txt) do (curl http://twitter.com/users/show.xml?screen_name=%%i >>out.xml & ping -n 2 -w 1 127.0.0.1>NUL)
- Run the batch file, it creates “out.xml”
- Load the XML file into notepad/wordpad
- Search and replace to remove the following <?xml version=”1.0″ encoding=”UTF-8″?>
- Except for the first line which must remain
- Then add in <twits> as the second line in the file and </twits> as the last line of the file
- Now save the XML file
- Load it into Excel.
- All done, enjoy
Tags: automation, statistics, Twitter, twitter stats, user information
Categories: Research, Social Media