I am inquiring about executing javascript in the browser with selenium. I've seen plenty of ways how to do this, however, saving the output to a variable seems to be something else.
r = driver.execute_script("`; ${document.cookie}`.split(`; bearer_token=`).pop().split(';').shift()")
This makes R = None, which is not the output of the code.