Created
July 6, 2024 21:24
-
-
Save gavingmiller/bc54cc94c411358d37c246d8d7d2b0fe to your computer and use it in GitHub Desktop.
get-response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_response(html) | |
html.chomp! | |
start_index = html.index('Begin Response !-->') + | |
'Begin Response !-->'.length | |
end_index = html.index('<!-- End Response') | |
result = html[start_index, end_index - start_index] | |
while (result.index('}')) | |
result = result[result.index('}') + 1, | |
result.length - result.index('}')] | |
end | |
return result | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment