?

Log in

No account? Create an account
Look what we can do! - Greg [entries|archive|friends|userinfo]
Greg

[ website | gregstoll.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| * Homepage * Mobile apps (Windows Phone, Win8, Android, webOS) * Pictures * LJBackup * Same-sex marriage map * iTunesAnalysis * Where's lunch? ]

Look what we can do! [Mar. 9th, 2007|09:07 am]
Greg
[Tags|, , ]
[Current Mood |accomplishedaccomplished]

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!
LinkReply

Comments:
[User Picture]From: wildrice13
2007-03-09 04:11 pm (UTC)
I would love to see something like what you used to have with GT, including professions and all that! 'Twould be very helpful :D
(Reply) (Thread)
[User Picture]From: gregstoll
2007-03-09 07:21 pm (UTC)
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.
(Reply) (Parent) (Thread)
From: (Anonymous)
2007-06-27 12:08 pm (UTC)

curl arguments

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

cheers
(Reply) (Thread)
[User Picture]From: gregstoll
2007-06-28 02:13 am (UTC)

Re: curl arguments

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.
(Reply) (Parent) (Thread)