url = o._replace(query=None).geturl()
if 'token' in query:
    query['token'] = 'NEW_TOKEN'
response = requests.get(url, params=query)
print(response.text)
Python-Requests, extract url parameters from a string