Skip to content

Commit

Permalink
Merge pull request #20 from RileyXX/add-install-chromedriver-fallback…
Browse files Browse the repository at this point in the history
…-method

Add chromedriver fallback install method
  • Loading branch information
RileyXX authored May 15, 2023
2 parents ec095ad + 8a9d332 commit 23acd14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions IMDbTraktSyncer/checkChromedriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ def install_chromedriver(version):
# Install the chromedriver-py package using pip
subprocess.run(['pip', 'install', f'chromedriver-py=={version}'])

def install_chromedriver_fallback_method():
print("Using install chromedriver-py fallback method")
# Install the chromedriver-py package using pip
feed = feedparser.parse('https://pypi.org/rss/project/chromedriver-py/releases.xml')
# Get the second latest release version
version = feed.entries[1].title.split()[-1]
# Install the chromedriver-py package using pip
subprocess.run(['pip', 'install', f'chromedriver-py=={version}'])

# Check if chromedriver-py is already installed
try:
dist = pkg_resources.get_distribution('chromedriver-py')
Expand Down Expand Up @@ -87,5 +96,7 @@ def install_chromedriver(version):
install_chromedriver(matching_version)
else:
print(f"No matching chromedriver-py version found for Chrome {chrome_version}")
install_chromedriver_fallback_method()
else:
print("Failed to retrieve Chrome version.")
install_chromedriver_fallback_method()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
long_description = "\n" + fh.read()

VERSION = '1.1.2'
VERSION = '1.1.3'
DESCRIPTION = 'This python script will sync user ratings for Movies and TV Shows both ways between Trakt and IMDb.'

# Setting up
Expand Down

0 comments on commit 23acd14

Please sign in to comment.