Open mizitean opened 2 months ago
Thank for your time and help,
I've tried to follow your steps but now I get a ssl error.
Traceback (most recent call last): File "/home/user/TinderBotz/quickstart.py", line 10, in
session = Session() ^^^^^^^^^ File "/home/user/TinderBotz/tinderbotz/session.py", line 120, in init self.browser = uc.Chrome(options=options) # ChromeDriverManager().install(), ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/.local/lib/python3.12/site-packages/undetected_chromedriver/init.py", line 258, in init self.patcher.auto() File "/home/user/.local/lib/python3.12/site-packages/undetected_chromedriver/patcher.py", line 175, in auto release = self.fetch_release_number() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/.local/lib/python3.12/site-packages/undetected_chromedriver/patcher.py", line 233, in fetch_release_number context = ssl.create_default_context(cafile=certifi.where()) ^^^ NameError: name 'ssl' is not defined. Did you forget to import 'ssl'?
I've tried on windows as well and I get:
PS C:\Users\user\Desktop\bot> python quickstart.py Getting ChromeDriver ... Traceback (most recent call last): File "C:\Users\user\Desktop\bot\quickstart.py", line 10, in session = Session() File "C:\Users\user\Desktop\bot\tinderbotz\session.py", line 120, in init self.browser = uc.Chrome(options=options) # ChromeDriverManager().install(), File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\undetected_chromedriver__init.py", line 258, in init__ self.patcher.auto() File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\undetected_chromedriver\patcher.py", line 175, in auto release = self.fetch_release_number() File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\undetected_chromedriver\patcher.py", line 234, in fetch_release_number context = ssl.create_default_context(cafile=certifi.where()) NameError: name 'ssl' is not defined /==============\ Tinderbotz duration: 0 like: 0 dislike: 0 superlike: 0 \==============/ Started session: 2024-08-13 15:13:12 Ended session: 2024-08-13 15:13:12
message me on telegram @mizitean
I managed to fix it.
Add to the patcher.py
import ssl
import certifi
GET CODE FROM THIS PULL REQUEST https://github.com/frederikme/TinderBotz/pull/130#issue-2081949157
and then follow steps
U MIGHT HAVE DIFFERENT VERSION THAN MINE (3.10), BUT IT SHOULD WORK FOR YOUR VERSION ALSO
Comment in session.py
# self.browser.quit()
Navigate to the undetected_chromedriver Package Directory:
cd /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/undetected_chromedriver
Update certifi: Ensure you have the latest version of the certifi package:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --upgrade certifi
Edit the patcher.py File
nano patcher.py
Modify the fetch_release_number Method:
import os import certifi os.environ['SSL_CERT_FILE'] = certifi.where()