Titan Network
More Titan Projects => City Info Tracker => Suggestions and Discussion => Topic started by: wilcoxon on May 29, 2009, 05:38:07 AM
-
I looked at the Private XML Feeds but they just provide basic character info. An XML checklist would be awesome.
A long time ago (under previous version of CIT), I had a script that grabbed the HTML checklist and parsed it. I just updated it so it should work with the current CIT.
However, login seems to be an issue. Whenever I try to grab http://cit.cohtitan.com/manage/checklist/xxxx, I end up with the login page instead of the checklist. This happens whether using LWP in Perl or wget and when supplying a cookie file (exported from Firefox while logged in) and/or username/password auth. Any ideas how to be able to programmatically grab the checklist?
-
I looked at the Private XML Feeds but they just provide basic character info. An XML checklist would be awesome.
A long time ago (under previous version of CIT), I had a script that grabbed the HTML checklist and parsed it. I just updated it so it should work with the current CIT.
However, login seems to be an issue. Whenever I try to grab http://cit.cohtitan.com/manage/checklist/xxxx, I end up with the login page instead of the checklist. This happens whether using LWP in Perl or wget and when supplying a cookie file (exported from Firefox while logged in) and/or username/password auth. Any ideas how to be able to programmatically grab the checklist?
Which cookie are you passing in? Also, have you tried programmaticly logging in via the LWP or wget? Might be worth something there.
I have added the XML badgelist to "The List" (http://www.cohtitan.com/forum/index.php/topic,2277.msg25242.html#msg25242), but as you can see, the list is a bit long.
-
I'm passing in whichever cookie(s) it asks for. I dumped my Firefox cookies and then removed all non-cohtitan cookies from the file (leaving 5-6 cookies).
I'll probably look at programmatically logging in next if nobody has simpler, more direct suggestions. It was way too late last night when I quit working on it as it was.
-
Cute. CIT uses Flash to handle the login. As far as I know, there is no way to programmatically interact with Flash.
Is there any possibility of not using Flash for the login or of allowing username and password to be passed in as GET arguments so that it is possible to retrieve the checklist outside of a manual browser?
I still have no idea why the cookies don't seem to be working in LWP or wget.
Then again, XML badgelists (per character) would alleviate the need to login or parse HTML.
-
Cute. CIT uses Flash to handle the login. As far as I know, there is no way to programmatically interact with Flash.
Is there any possibility of not using Flash for the login or of allowing username and password to be passed in as GET arguments so that it is possible to retrieve the checklist outside of a manual browser?
I still have no idea why the cookies don't seem to be working in LWP or wget.
Then again, XML badgelists (per character) would alleviate the need to login or parse HTML.
It isn't flash, it is AJAX. The only bit that might be flash is the loading wheel.
-
Hmm. That's odd. The loading wheel definitely looks like the Flash one and the FlashBlock Firefox addon offers to block the popup login window (which I've never seen it do for anything that isn't really Flash).
That's even odder. I just tried it again and the FlashBlock options only show up in the context menu sometimes.
AJAX isn't much more program friendly than Flash typically (I'll look at the JavaScript just in case) so I guess I'm stuck manually downloading the checklist to parse until there is XML checklists. :(
-
lol, it's Javascript jQuery Ajax calls.
Try sending the call to http://cit.cohtitan.com/login/ajax (http://cit.cohtitan.com/login/ajax) or http://cit.cohtitan.com/login.html (http://cit.cohtitan.com/login.html).
It's set to use javascript to forward a successful log in to manage, but since you're just trying to set sessions... should bounce back the right stuff.
-
It's only a start, but the checklist no longer requires you to be logged in. It also has a new address. You can find it at http://cit.cohtitan.com/checklist/{charid}. The checklist also respects the character's hidden status. If the character is hidden, you will need to be logged in to see the list.
I will still be putting out an XML version, and the shorts version, just later.
-
Thanks. I'll check it out tomorrow (when I'm more awake). That sounds like a great start (and should be sufficient for what I want until an XML checklist is done).
-
Yea, we tried that, as Nicster said, "... it's making the server cry". lol
The idea was to have one grand XML feed for all the characters on the account using the same key the private character listings use... I have like 3 characters up on CIT right now (Q&A reasons) and even that took a bit to load.
We'll figure something out... I'm thinking along the lines of JSON, it's way more lightweight and any OOP language can decode it, including PHP parse.
-
Yea, we tried that, as Nicster said, "... it's making the server cry". lol
The idea was to have one grand XML feed for all the characters on the account using the same key the private character listings use... I have like 3 characters up on CIT right now (Q&A reasons) and even that took a bit to load.
We'll figure something out... I'm thinking along the lines of JSON, it's way more lightweight and any OOP language can decode it, including PHP parse.
I plan on having individual feeds for each character. Just a matter of figuring out the best way to pseudo-secure it (similar to the other XML feeds), and creating a UI that doesn't suck.
-
It's only a start, but the checklist no longer requires you to be logged in. It also has a new address. You can find it at http://cit.cohtitan.com/checklist/{charid}. The checklist also respects the character's hidden status. If the character is hidden, you will need to be logged in to see the list.
I will still be putting out an XML version, and the shorts version, just later.
Awsume. ;D
-
Awsume. ;D
I guess I should also point out that I have the initial "short" version up at http://cit.cohtitan.com/checklist/short/{charid}
The "tip" listed will still need to be adjusted, but this is a start.
-
Ooo. I like that.
-
I guess I should also point out that I have the initial "short" version up at http://cit.cohtitan.com/checklist/short/{charid}
The "tip" listed will still need to be adjusted, but this is a start.
A good start indeed. Nice work. :)
I hope you'll be working in a short description of the requirements. I'd prefer them over tips to be honest. Some tips can be a bit redundant, but if they can be fitted I have no quarrel. ;)
Eg: Devoted (331) - 27 months
Exalted (1144) - Pay off 10,000,000 Debt - Keep Dying and working off your Debt.
-
A good start indeed. Nice work. :)
I hope you'll be working in a short description of the requirements. I'd prefer them over tips to be honest. Some tips can be a bit redundant, but if they can be fitted I have no quarrel. ;)
Eg: Devoted (331) - 27 months
Exalted (1144) - Pay off 10,000,000 Debt - Keep Dying and working off your Debt.
The "tip" listed will still need to be adjusted, but this is a start.
That's what I meant ;)
It is just going to take a bit for us to sit down and actually change every tip entry for basically every badge in the DB.
-
It is just going to take a bit for us to sit down and actually change every tip entry for basically every badge in the DB.
If there's anything I can do to help, let me know. :)
-
Changing them isn't so hard, just a little lengthy for time usage, but we can get it done no sweat.
-
*blows the dust away from this thread*
XML and JSON lists are now available. Also, I have linked the "Short" version of the checklist from http://cit.cohtitan.com/checklist/ (http://cit.cohtitan.com/checklist/){char_id}
Still haven't really done anything for the missing/long tip text, but hopefully that'll be fixed soon.
-
Wow! That's great! I'm glad I've been distracted and didn't get any further on my HTML list parser - now I can just trivially use the XML or JSON checklist.
Thanks much.
-
I've tweaked the links a bit, and there is now a central checklist "menu" where you can get the links for all of your characters. You can now access it when logged in from http://cit.cohtitan.com/checklist (http://cit.cohtitan.com/checklist)
-
Would it be possible to change the links to XML and JSON checklists to be char_id based? It's much easier if I can just do /checklist/<type>/<char_id> for any type rather than char_id for short and long and arbitrary "random" string for XML and JSON.
-
Would it be possible to change the links to XML and JSON checklists to be char_id based? It's much easier if I can just do /checklist/<type>/<char_id> for any type rather than char_id for short and long and arbitrary "random" string for XML and JSON.
The point of the key was to allow some type of privacy control settings for those checklists. Some people may want their characters hidden from everyone else, but may want to use the checklist. If we make it based on the character id, you'll need to be logged into the site to view the feeds. At least this way, you as a player can control what is seen.
-
Don't know if anyone brought this to your attention or not, but the link for the badge checklist on the "Edit Character" screen does not work. It may be a good idea to have it point to the checklist page you recently added.
-
Don't know if anyone brought this to your attention or not, but the link for the badge checklist on the "Edit Character" screen does not work. It may be a good idea to have it point to the checklist page you recently added.
Hah! People use CIT and talk about it? :P
Changed it to point to the long checklist.