Resuest & Response Parse Samples Python

RoyReddyRoyReddy Registered Users Posts: 2 Beginner grinner
Looking for Parsing XML help.

I am a noob to the SM_API and Python. Decades ago I did write Asm, and C. :D a few things have advanced since then.

Using the v1.2.0 endpoints -
I have been successful in cobbling together a few Python programs to
smugmug.login.anonymously
smugmug.login.withPassword
smugmug.login.withHash
{attached a Hash samples request and response}

in xmlrpc Each of these responds with a lengthy XML <methodResponse>

login.anonymous also cobbled using the rest,json, php endpoints

Note: Curl was a large help for reverse engineering the Request structure
Gosh! I wish that there was a more elaborate API Manual
!Heck I volunteer to write & test it - if someone _SM_ provides content in raw form

====
I am now confounded with trying to Parse the Session Id out of the reponse strings
I have looked at most all of the api/wrappers posted.
I have scoured code.activestate.com/recipes for python samples against SM API and XML

I have experimented with parsing ElementTrees, none of the Find(s) nor getIterator located the session


I may have to tattoo 'thick' on my forehead. No significant progress.

----
I would appreciate your advise, pointers or samples to break through this Parsing challange.

RoyReddy - Toronto Cananda eh!

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 25, 2009
    Hey Roy,

    There is an existing SmugMug python project, you can check it out here.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.