Look what we can do!
Mood: accomplished
Posted on 2007-03-09 09:07:00
Tags: pictures worldofwarcraft programming
Words: 242

Last night, I accomplished the following things:

- grocery shopping
- mole check
- wrote a script to download data from the World of Warcraft Armory, and set it up to download every guild member's stats nightly. At some point I'll do something neat with the data. (to do this I used the new Python XML library elementtree, which is better than the builtin stuff, but not nearly as nice as e4x) I had to solve a bit of a mystery - when I would fetch the URL http://armory.worldofwarcraft.com/character-sheet.xml?r=Maiev&n=Tsouzer in Firefox and the HTML page would show up, but I could view source and see the raw XML data that I wanted. When I fetched it with wget or curl, I would always get the HTML page, not the XML data. The key is to fake out the user-agent: I guess if it thinks you support the fancy XML processing it does (with XSLT, I think?) it will give you the data, otherwise it gives you standard HTML any browser can handle. Neat idea, I guess.
- fixed my automatic del.icio.us bookmark backup script (the API had changed a little).
- seemingly fixed the problems with sending email from my computer, although it still complains that it can't write to the log file.
- put up a (very) few pictures.
- updated my backup script to back up some more databases

A lot of this stuff had been hanging over my head for a while, so I feel great today!


4 comments

Comment from anonymous:
2007-06-27T07:08:35+00:00

Hi, was trying to do the same thing in curl, but didnt figure out the arguments for user-agent. could you post them ?

cheers

Comment from gregstoll:
2007-06-27T21:13:36+00:00

Actually, I just ended up using python's urllib2 to do it, with the line

req.add_header('User-Agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2')

which probably isn't too helpful. According to the curl manpage it looks like -A or --user-agent is what you want. The user-agent above was just my user-agent at the time - others will work too.

Comment from wildrice13:
2007-03-09T10:11:38+00:00

I would love to see something like what you used to have with GT, including professions and all that! 'Twould be very helpful :D

Comment from gregstoll:
2007-03-09T13:21:37+00:00

Ooh, good idea! That shouldn't be too hard. Plus I'm looking forward to tracking changes in health, mana, etc...although buffs make that tricky.

This backup was done by LJBackup.