Open Aloneintokyoo opened 2 years ago
try adding
chrome_options.add_argument('--no-sandbox --disable-dev-shm-usage --headless')
at line 34. This might happen becuase you are trying to run selenium without a display available. see this for more info.
I have added thius line but the same error:
Mode: 1
TikTok video URL: https://www.tiktok.com/@abdeljalilelm/video/7264272827841383685?is_from_webapp=1&sender_device=pc&web_id=7257290506450241051
Traceback (most recent call last):
File "C:\Fouad\Youtube et Création Contenu\TikTok\tiktodv3-master\tiktodv3.py", line 37, in
/_ / / /// / \/ \ | | / / / / / / // ,< / / / / / / / / / | | / / / < / / / // /| | / / / // / // / | |/ // / /_/ /// ||// _// |_//__/
Mode: 2 TikTok video URL: https://www.tiktok.com/@user/video/21326445213131231 Traceback (most recent call last): File "/home/user/Downloads/tiktodv3/tiktodv3.py", line 42, in
driver = webdriver.Chrome( options=chrome_options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in init
super().init(DesiredCapabilities.CHROME['browserName'], "goog",
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/chromium/webdriver.py", line 92, in init
super().init(
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 272, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 364, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
0 0x564c8d1df343
1 0x564c8cfe954a
2 0x564c8d00f253
3 0x564c8d00a256
4 0x564c8d048af6
5 0x564c8d04845f
6 0x564c8d040a73
7 0x564c8d0154f3
8 0x564c8d016731
9 0x564c8d22d62e
10 0x564c8d230ac2
11 0x564c8d213f4e
12 0x564c8d231743
13 0x564c8d20836f
14 0x564c8d251a28
15 0x564c8d251ba6
16 0x564c8d26bd52
17 0x7fe5af08784a