I have deployed a selenium wire script on Ubuntu 20.04.3 server. However when I run the script locally it runs fine and returns the fingerprint value however when deployed in the server it does not return anything but only that driver has been saved in cache. What seems to be the trouble?
the code that I ran in the script is as follows:
from seleniumwire import webdriver
from webdriver_manager.chrome import ChromeDriverManager
set options to be headless, ..
options = webdriver.ChromeOptions()
options.set_capability("goog:loggingPrefs", {"performance": "ALL", "browser": "ALL"})
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
open it, go to a website, and get results
driver = webdriver.Chrome(ChromeDriverManager().install(),options=options)
driver.get('https://alfagift.id/')
fingerprintFound = False
for request in driver.requests:
hdict = dict(request.headers)
for header_key in hdict.keys():
if header_key == "fingerprint":
fingerprint = hdict[header_key]
fingerprintFound=True
if fingerprintFound:
print(fingerprint)