Fix ChromeDriver compatibility and update desktop icon

This commit is contained in:
nmemmert committed 2025-11-17 09:24:16 -05:00
1 parent 9b63031c1e
commit 5f88cdd92b
2 files changed
+19 -5

No files matched your search

+6
View File
@@ -15,6 +15,12 @@ source "$DIR/.venv/bin/activate"
# Install dependencies
pip install -r "$DIR/requirements.txt"
# Check if Chromium is installed, install if not
if ! command -v chromium-browser > /dev/null 2>&1; then
echo "Chromium not found. Installing Chromium..."
sudo apt update && sudo apt install -y chromium-browser
fi
# Run the application
cd "$DIR"
python3 journey_fm_app.py
+13 -5
View File
@@ -9,9 +9,9 @@ creates a playlist of matching songs, and imports it into Plex.
import time
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.service import Service
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from bs4 import BeautifulSoup
import os
@@ -31,8 +31,16 @@ def scrape_recently_played():
"""Scrape recently played songs from myjourneyfm.com using Selenium"""
options = Options()
options.add_argument("--headless")
service = Service(GeckoDriverManager().install())
driver = webdriver.Firefox(service=service, options=options)
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--disable-gpu")
options.add_argument("--remote-debugging-port=9222")
options.add_argument("--user-data-dir=/tmp/chromium")
options.add_argument("--no-first-run")
options.add_argument("--disable-extensions")
options.binary_location = "/usr/bin/chromium-browser"
service = Service()
driver = webdriver.Chrome(service=service, options=options)
url = 'https://www.myjourneyfm.com/recently-played/'
driver.get(url)