So I'm trying to get a value from a object in html. I've found out how to get the value, but there's extra stuff being added to it that I don't want.
I've tried using .split() and groups but none of those have done anything.
html = r.text
checkouttoken = re.search('DF_CHECKOUT_TOKEN = (.*?);', html, re.S)
print(checkouttoken.group(0))
Expected:
27f37949bb8a76ede81508c8c1b750c8
Actual:
< iframe srcdoc="<script>!function(){var e=function(e){var t={exports:{}};return e.call(t.exports,t,t.exports),t.exports},r=function(){fun
DF_CHECKOUT_TOKEN = "27f37949bb8a76ede81508c8c1b750c8";