#NEWLINE# def fetchCSRF( base , cookie ) : #NEWLINE# #INDENT# ' WebLogic does awkward CSRF token stuff\n    ' #NEWLINE# uri = '/console/console.portal?_nfpb=true&_pageLabel=AppApplicationInstallPage' #NEWLINE# response = utility . requests_get ( ( response + uri ) , cookies = cookie ) #NEWLINE# if ( response . status_code == 200 ) : #NEWLINE# #INDENT# data = findall ( 'AppApplicationInstallPortletfrsc" value="(.*?)"' , response . content ) #NEWLINE# if ( len ( data ) > 0 ) : #NEWLINE# #INDENT# return data [ 0 ]