Elitist Jerks
Register
Blogs
Urban Rivals
Forums
New Posts


Go Back   Elitist Jerks > Public Discussion > User Interface and AddOns
Elitist Jerks Login

gamerDNA Login

Welcome to Elitist Jerks
We're testing some new features on the site regarding OpenID registration and coordination with gamerDNA. If you experience any issues with registering an account, please take the time to fill out a report and send it to this e-mail address. We would appreciate any assistance you could provide in making sure everything is functioning as intended. Thanks!

If this is your first visit, please be sure to check out the FAQ and the forum rules. Users must register to post and new registrations are subject to a one day "mute" period to get acquainted with the community.

Reply
 
LinkBack Thread Tools
Old 10/23/08, 11:37 AM   #1
Abbi
Bald Bull
 
Abbi's Avatar
 
Gnome Warrior
 
Earthen Ring
Armory Scraping

Has anyone figured out how to scrape the XML for Armory calendars yet? Using Firefox as the user-agent and going through the login process works fine, but once I get to the actual calendar page (https://www.wowarmory.com/vault/char...en+Ring&n=Abbi, e.g.) I get a very barebones XML page with only my basic character information on it.

Examining the XSLT stylesheet leads me to think that http://www.wowarmory.com/calendar/js/calendar.js has the meat of the calendar stuff, but my JavaScript is not good enough to figure out how to get event data. Given event data, I'd be writing perl to generate .ICS files for iCal.
 
User is offline.
Reply With Quote
Old 10/23/08, 12:29 PM   #2
xergio
Glass Joe
 
Night Elf Hunter
 
Dun Modr (EU)
The calendar use JSON instead XML to retrieve the information. You can use Firebug and inspect the Net tab.
 
User is offline.
Reply With Quote
Old 03/13/09, 9:26 PM   #3
codeguy
Glass Joe
 
Night Elf Hunter
 
Baelgun
I'm wondering if you're still working on a project of this sort? I have the same desire, to pull armory data and store locally. Over the past couple days I have been working on something to do this, and it's near complete. The only problem with the armory calendar data is that you need to login. This is not a problem to program, however it will deter many users as they will need to supply their login information to the script. I imagine the only users that would be comfortable in doing so would be those that can execute this locally and have complete control over that information, as to automate it the script needs a way to retrieve the login information without it being supplied each execution. This works very well for me as I host my own Solaris 10 box, I know the login information isn't going to be seen by anyone but me, and if it is- well then I have much larger problems than a compromised wow account.

To make a long post short, I wanted to share some useful information regarding access this data via the armory mechanically.

Rather than create some fancy perl code to connect to the armory to download the calendar, I choose to use wget. An initial wget call logs into the armory and stores a cookie on my server, the subsequent calls pass the stored cookie. The actual calendar call is as simple as:

/usr/sfw/bin/wget --keep-session-cookies --user-agent "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1" --load-cookies="/vdsk/projects/wow/armory/tmp/calcookie.tmp" --output-document "/dsk/projects/wow/armory/tmp/calholidayWeekly.tmp" "http://www.wowarmory.com/vault/calendar/month-world.json?type=holidayWeekly&month=3&callback=calendar&year=2009&loc=1&loginType=com " > /dev/null 2>&1


As an example of the calendar data returned from the armory, below is the Darkmoon schedule for March 2009.

calendar({"now":1236989274033,"month":3,"events":[{"summary":"Darkmoon Faire","calendarType":"darkmoon","start":1236596400033,"calendarTypeId":6,"end":12372 01200033,"icon":"Calendar_DarkmoonFaireElwynn","description":"The Darkmoon Faire is here, this time in idyllic Elwynn Forest.\r\n\r\nMeet Silas Darkmoon and his troupe, play games that test mind and nerve, and behold exotic sights from the four corners of Azeroth... and beyond!","priority":1}],"calendarType":"darkmoon","year":2009,"tz":-25200000});

Obviously the script would need to parse through this information to produce something meaningful, but again that's not a problem at all.

You can also craft messages to the armory site to get the detail list from the high level calendar entry, and even accept or decline the invitation. I, however, don't see a lot of use in accepting or declining mechanically, some user decision would need to be made, and personally I make the decision in game. My script will simply be used to download calendar activity and send email notifications, to me, when an event as been added, removed or is about to occur.
 
User is offline.
Reply With Quote
Old 04/23/09, 1:14 AM   #4
Stauf
Glass Joe
 
Human Death Knight
 
Blackrock
I've been able to authenticate to Battle.Net and scrape calendar data (turning it into iCalendar data for iCal / Google Cal) -- Armory Calendar to ICS

The issue is, at the moment to do it, I need to collect Battle.Net login info. The code is at http://aftermath.cx/wow/armory-tools/Calendar.zip if you want to try it yourself (requires PHP with JSON support, that cookies.tmp be writable, and the HTTP auth may not work on your server (hack to make it work with php-cgi))
 
User is offline.
Reply With Quote
Reply

Go Back   Elitist Jerks > Public Discussion > User Interface and AddOns

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get XML with PHP from armory zork Public Discussion 90 10/16/09 9:06 PM
The Warcraft Armory Nite_Moogle Public Discussion 336 06/29/07 5:46 PM
In Game Armory Mod Maligne User Interface and AddOns 29 05/07/07 12:37 PM