Closed xDaijobu closed 3 months ago
Yes you can remove exit app.
def prepare_prerequisites(self):
uph = self.update_headers()
if not uph:
self.logger.error("[!] We ran into trouble with the updates to the headers! π« The script is not stopping, but this is an issue.")
atk = self.get_auth_token()
if not atk:
self.logger.error("[!] We ran into trouble with the get auth token! π« The script is not stopping, but this is an issue.")
@K1ckMan Not good action
same problem
same
same issue
same problem
@K1ckMan Not good action
Temporary workaround, skip auth check. But I canβt found how to fix error getting new key.
same problem
Wait pls
Please test the update and let me know if it's correct, thank you π
it works thanks^^ @Poryaei
its not working for me on ubuntu 22.0
Making [chromedriver 126.0.6478.61] executable ...
[chromedriver 126.0.6478.61] is now ready for use!
Traceback (most recent call last):
File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3862, in get_local_driver
driver = webdriver.Chrome(options=chrome_options)
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
super().__init__(
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__
self.service.start()
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start
self.assert_process_still_running()
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running
raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/All-In-One/app.py", line 10, in <module>
from scripts.bypass_js import driver_instance
File "/root/All-In-One/scripts/bypass_js.py", line 66, in <module>
driver_instance = SingletonDriver()
File "/root/All-In-One/scripts/bypass_js.py", line 13, in __new__
cls._instance.driver_context = DriverContext()
File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 44, in __init__
self.driver = Driver(*args, **kwargs)
File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 529, in Driver
driver = browser_launcher.get_driver(
File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 1657, in get_driver
return get_local_driver(
File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3944, in get_local_driver
driver = webdriver.Chrome(
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
super().__init__(
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__
self.service.start()
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start
self.assert_process_still_running()
File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running
raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127
Exception ignored in: <function SingletonDriver.__del__ at 0x7f67f9d79cf0>
Traceback (most recent call last):
File "/root/All-In-One/scripts/bypass_js.py", line 63, in __del__
AttributeError: 'SingletonDriver' object has no attribute 'driver_context'
its not working for me on ubuntu 22.0
Making [chromedriver 126.0.6478.61] executable ... [chromedriver 126.0.6478.61] is now ready for use! Traceback (most recent call last): File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3862, in get_local_driver driver = webdriver.Chrome(options=chrome_options) File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__ super().__init__( File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__ self.service.start() File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start self.assert_process_still_running() File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}") selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/All-In-One/app.py", line 10, in <module> from scripts.bypass_js import driver_instance File "/root/All-In-One/scripts/bypass_js.py", line 66, in <module> driver_instance = SingletonDriver() File "/root/All-In-One/scripts/bypass_js.py", line 13, in __new__ cls._instance.driver_context = DriverContext() File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 44, in __init__ self.driver = Driver(*args, **kwargs) File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 529, in Driver driver = browser_launcher.get_driver( File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 1657, in get_driver return get_local_driver( File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3944, in get_local_driver driver = webdriver.Chrome( File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__ super().__init__( File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__ self.service.start() File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start self.assert_process_still_running() File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}") selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127 Exception ignored in: <function SingletonDriver.__del__ at 0x7f67f9d79cf0> Traceback (most recent call last): File "/root/All-In-One/scripts/bypass_js.py", line 63, in __del__ AttributeError: 'SingletonDriver' object has no attribute 'driver_context'
oh, I did not have the libnss3 package, it was fixed by installing it
Amazing program for automation! Thank you porya
For those who don't know , you need to install libness3 on ubuntu to make the script run smoothly: https://askubuntu.com/questions/61931/how-to-install-libnss3-dev
Good luck!
BW If you use Docker (like me) for fix it can be helpful (I can't say is the best choice, but it's working)
FROM python:3.10-slim
RUN apt-get update \
&& apt-get install -y \
wget \
unzip \
curl \
gnupg \
libglib2.0-0 \
libnss3 \
libnss3-dev \
libgconf-2-4 \
libfontconfig1 \
libxrender1 \
libxtst6 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "main.py"] #use your main script
it's working now
thanks
@glushko Thanks
I tried to remove Selenium! So if you can't run the code with Selenium, you can update it.
thx, it's working π₯