As already mentioned within the comments, this token is JS generated and can not be fetched using requests
or curl
or whatever.
An easy (but not very performant) way is Selenium using e.g. Firefox:
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.headless = True # Don't open a visible pop-up window
driver = webdriver.Firefox(options=options)
driver.get('https://www.avis.com.au/en/home')
cookies = driver.get_cookies()
driver.quit()
print(cookies)
[{'name': 'akaalb_production_config', 'value': '~op=avis_au:avis-au-us-dal|~rv=37~m=avis-au-us-dal:0|~os=7f956ca2417c5e686d715889b6a30f65~id=a09a33378351c4e0fb1683926d7cf558', 'path': '/', 'domain': 'www.avis.com.au', 'secure': True, 'httpOnly': False}, {'name': 'APISID', 'value': 'd3879ba0-bdec-488e-94f5-0c517b8d300f', 'path': '/', 'domain': 'www.avis.com.au', 'secure': True, 'httpOnly': True}, {'name': 'DIGITAL_TOKEN', 'value': '89a7cd03-276c-4f2f-942f-07a5171a13d2-02-cdal-ho3904', 'path': '/', 'domain': 'www.avis.com.au', 'secure': True, 'httpOnly': True}, {'name': 'datacenter', 'value': 'cdal', 'path': '/', 'domain': 'www.avis.com.au', 'secure': True, 'httpOnly': True}, {'name': 'visitorId', 'value': 'cdal-A96653921-88e6-431a-9b08-2582dfe47a75', 'path': '/', 'domain': 'www.avis.com.au', 'secure': True, 'httpOnly': True, 'expiry': 1927796685}, {'name': 'SessionPersistence', 'value': 'PROFILEDATA%3A%3DauthorizableId%253Danonymous', 'path': '/', 'domain': 'www.avis.com.au', 'secure': False, 'httpOnly': False}]
Here you already see your token. Fetch it e.g. via:
print([ c for c in cookies if 'DIGITAL_TOKEN' in c.values() ][0]['value'])
89a7cd03-276c-4f2f-942f-07a5171a13d2-02-cdal-ho3904