<s> from common import * <EOL> import base64 <EOL> import requests <EOL> from xml . etree . ElementTree import Element , SubElement , tostring , fromstring <EOL> request = requests . get ( baseurl + "<STR_LIT:/>" + tablename + "<STR_LIT>" , headers = { "<STR_LIT>" : "<STR_LIT>" } ) <EOL> if issuccessful ( request ) == False : <EOL> print "<STR_LIT>" + str ( request . status_code ) + "<STR_LIT>" + request . text <EOL> quit ( ) <EOL> root = fromstring ( request . text ) <EOL> for row in root : <EOL> message = '<STR_LIT>' <EOL> linenumber = <NUM_LIT:0> <EOL> username = '<STR_LIT>' <EOL> for cell in row : <EOL> columnname = base64 . b64decode ( cell . get ( '<STR_LIT>' ) ) <EOL> if cell . text == None : <EOL> continue <EOL> if columnname == cfname + "<STR_LIT::>" + messagecolumn : <EOL> message = base64 . b64decode ( cell . text ) <EOL> elif columnname == cfname + "<STR_LIT::>" + linenumbercolumn : <EOL> linenumber = decode ( cell . text ) <EOL> elif columnname == cfname + "<STR_LIT::>" + usernamecolumn : <EOL> username = base64 . b64decode ( cell . text ) <EOL> rowKey = base64 . b64decode ( row . get ( '<STR_LIT:key>' ) ) <EOL> if linenumber % <NUM_LIT:10> == <NUM_LIT:0> and message . find ( "<STR_LIT>" ) != - <NUM_LIT:1> : <EOL> print ( rowKey + "<STR_LIT::>" + str ( linenumber ) + "<STR_LIT::>" + username + "<STR_LIT::>" + message ) ; </s>
