TinderBotz
TinderBotz copied to clipboard
Support New Chrome and undetected-chromedriver Versions
This is to address issues #123 and #126.
-
Bumped selenium (4.16.0), undetected-chromedriver (3.5.4), and webdriver-manager (4.0.1) to support the newest Chrome versions (114 and above).
-
Removed ".v2" from "import undetected_chromedriver.v2" to address new version importing issue.
-
Moved self.started attribute declaration to line 51 so that line 71 doesn't raise "no attribute 'started'" exception.
Tested with Chrome v120 and confirmed everything runs smoothly.
Thank you for your update! Unfortunately, I encountered the same problem and the solution provided didn't work for me. I'm new to Python and would appreciate any help.
Here are the details of my setup:
- Windows x64
- Google Chrome for Testing 121.0.6167.85 and Google Chrome 121.0.6167.140 (tried both)
- Chromebrowser 121.0.6167.85
- Selenium 4.16.0
- Undetected-chromedriver 3.5.4
- Webdriver-manager 4.0.1
- Pillow 10.0.1 (also tried 10.2.0)
- Deepface 0.0.84
- Opencv-python 4.9.0.80
C:\TinderBotz-master>py auto_swipe.py
Getting ChromeDriver ...
Traceback (most recent call last):
File "C:\TinderBotz-master\auto_swipe.py", line 14, in
Tinderbotz |
---|
duration: 1 |
like: 0 |
dislike: 0 |
superlike: 0 |
==============/ |
Started session: 2024-02-06 22:22:51 |
Ended session: 2024-02-06 22:22:53 |
Exception ignored in atexit callback: <function Session.init. |
Traceback (most recent call last): |
File "C:\TinderBotz-master\tinderbotz\session.py", line 76, in cleanup |
self.browser.quit()
^^^^^^^^^^^^
AttributeError: 'Session' object has no attribute 'browser'
C:\TinderBotz-master>
I got mine working, in session.py uncomment "self.browser.quit()" by adding a # infront. For me its line 74. All of the changes above from the first guy has to be made. Manually update undetected-chromedriver like this: (pip install --upgrade undetected-chromedriver) without the ( ) brackets. Mine installed version 3.5.5 and then i just had to update chrome to version 126.
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:
def fetch_release_number(self):
context = ssl.create_default_context(cafile=certifi.where())
with urlopen(self.url_repo + path, context=context) as conn:
# existing code to fetch and process the release number
...
- Save the Changes:
Press Control + X, then Y, then Enter
- Set the Environment Variable in session.py
import os
import certifi
os.environ['SSL_CERT_FILE'] = certifi.where()