def _getphotosets(self):
sets={}<EOL>if not self._connectToFlickr():<EOL><INDENT>print("<STR_LIT>")<EOL>return sets<EOL><DEDENT>psets = self.flickr.photosets_getList(user_id=myid)<EOL>for myset in psets.find('<STR_LIT>').findall('<STR_LIT>'):<EOL><INDENT>key=myset.find('<STR_LIT:title>').text<EOL>sets[key]={}<EOL>sets[key]['<STR_LIT>']=int(myset.attrib['<STR_LIT>'])<EOL>sets[key]['<STR_LIT>']=(myset.attrib['<STR_LIT>'])<EOL>sets[key]['<STR_LIT:id>']=int(myset.attrib['<STR_LIT:id>'])<EOL>sets[key]['<STR_LIT:url>']='<STR_LIT>'%(myid,sets[key]['<STR_LIT:id>'])<EOL><DEDENT>return sets<EOL>
Returns dictionary of photosets retrieved from flickr
        d['title']['number_photos'] : Number of photos
        d['title']['id']            : ID of photoset
        d['title']['photo_id']      : ID of primary photo
        d['title']['url']           : URL to photoset