Closed mmoore99 closed 2 years ago
I was running as root when I executed the command in the first post. I changed to a user account and am now getting the following error:
mike@fiddlemon-prod:/home/ubuntu/southwest-headers$ env/bin/python southwest-headers.py
Traceback (most recent call last):
File "southwest-headers.py", line 29, in <module>
driver = webdriver.Chrome(os.getcwd() + "/chromedriver", options=chrome_options)
File "/home/ubuntu/southwest-headers/env/lib/python3.8/site-packages/seleniumwire/webdriver.py", line 189, in __init__
config = self._setup_backend(seleniumwire_options)
File "/home/ubuntu/southwest-headers/env/lib/python3.8/site-packages/seleniumwire/webdriver.py", line 36, in _setup_backend
self.backend = backend.create(
File "/home/ubuntu/southwest-headers/env/lib/python3.8/site-packages/seleniumwire/backend.py", line 24, in create
backend = MitmProxy(addr, port, options)
File "/home/ubuntu/southwest-headers/env/lib/python3.8/site-packages/seleniumwire/server.py", line 27, in __init__
self.storage = storage.create(**self._get_storage_args())
File "/home/ubuntu/southwest-headers/env/lib/python3.8/site-packages/seleniumwire/storage.py", line 39, in create
return RequestStorage(base_dir=kwargs.get('base_dir'))
File "/home/ubuntu/southwest-headers/env/lib/python3.8/site-packages/seleniumwire/storage.py", line 70, in __init__
os.makedirs(self.session_dir, exist_ok=True)
File "/usr/lib/python3.8/os.py", line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/tmp/.seleniumwire/storage-7815e557-5d89-4cbc-bbf6-93b21a29f898'
let's try this ...
make sure you're in the southwest-headers
folder and then run:
git pull origin develop
git checkout develop
env/bin/python southwest-headers.py
two things to test:
Thanks for responding so quickly and above all, thanks for your efforts to produce this solution to the Southwest checkin situation.
Regarding the testing of the fixes:
It now works fine when running under root.
When running under a user account the following error is generated:
ubuntu@fiddlemon-prod:~/southwest-headers$ cd /home/ubuntu/southwest-headers/ && env/bin/python southwest-headers.py
Traceback (most recent call last):
File "southwest-headers.py", line 63, in <module>
with open(output_file, "w") as json_file:
PermissionError: [Errno 13] Permission denied: 'southwest_headers.json'
ahh, my guess is that you created the southwest-headers
directory as the root user and when you logged in as a regular user, you tried running the script from that same folder created by root?
if that's the case, try logging in as the regular user and re-downloading/installing southwest-headers into it's own folder in the regular user's home directory. see if that gets things working as a regular user (which is how i'd probably recommend running this script as opposed to a root user).
ahh, my guess is that you created the
southwest-headers
directory as the root user and when you logged in as a regular user, you tried running the script from that same folder created by root?if that's the case, try logging in as the regular user and re-downloading/installing southwest-headers into it's own folder in the regular user's home directory. see if that gets things working as a regular user (which is how i'd probably recommend running this script as opposed to a root user).
Ok, that works. Thanks very much for your help.
google-chrome --version Google Chrome 96.0.4664.93
wget https://chromedriver.storage.googleapis.com/96.0.4664.45/chromedriver_linux64.zip
I am attempting to retrieve the headers, but get the following error:
Any suggetions would be appreciated.