<s> """<STR_LIT>""" <EOL> from social . p3 import urlsplit <EOL> from social . backends . open_id import OpenIdAuth <EOL> from social . exceptions import AuthMissingParameter <EOL> class LiveJournalOpenId ( OpenIdAuth ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> def get_user_details ( self , response ) : <EOL> """<STR_LIT>""" <EOL> values = super ( LiveJournalOpenId , self ) . get_user_details ( response ) <EOL> values [ '<STR_LIT:username>' ] = values . get ( '<STR_LIT:username>' ) or urlsplit ( response . identity_url ) . netloc . split ( '<STR_LIT:.>' , <NUM_LIT:1> ) [ <NUM_LIT:0> ] <EOL> return values <EOL> def openid_url ( self ) : <EOL> """<STR_LIT>""" <EOL> if not self . data . get ( '<STR_LIT>' ) : <EOL> raise AuthMissingParameter ( self , '<STR_LIT>' ) <EOL> return '<STR_LIT>' . format ( self . data [ '<STR_LIT>' ] ) </s>
