Skip to content

Instantly share code, notes, and snippets.

@Olical
Last active March 19, 2025 13:53
Show Gist options
  • Save Olical/07c9beb4a34127f08a3e07fb9227c8f6 to your computer and use it in GitHub Desktop.
Save Olical/07c9beb4a34127f08a3e07fb9227c8f6 to your computer and use it in GitHub Desktop.
Launch counter strike, join a https://www.warmupserver.net/ deathmatch
import subprocess
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
# Path to the FACEIT Anti-Cheat client
faceit_ac_path = "C:/Program Files/FACEIT AC/faceitclient.exe"
# Execute the anticheat
subprocess.Popen([faceit_ac_path], shell=False)
# Setup Firefox options
options = Options()
options.binary_location = (
"C:/Program Files/Mozilla Firefox/firefox.exe" # Set the Firefox binary path
)
options.add_argument("--headless") # Run Firefox in headless mode (background)
# Disable the steam:// link prompt by setting preferences
options.set_preference(
"network.protocol-handler.external.steam", True
) # Auto-allow steam:// links
options.set_preference(
"network.protocol-handler.warn-external.steam", False
) # Disable prompt for steam:// links
# Path to your geckodriver (if not in PATH)
geckodriver_path = "C:/Users/ollie/Programs/geckodriver.exe"
# Initialize WebDriver (Firefox)
service = Service(geckodriver_path)
driver = webdriver.Firefox(service=service, options=options)
try:
# Open the website
driver.get("https://www.warmupserver.net/quickjoin.php")
# Wait for the "QuickJoin Europe" button to be clickable
quickjoin_button = WebDriverWait(driver, 10).until(
EC.element_to_be_clickable((By.ID, "quick_eu"))
)
# Click the "QuickJoin Europe" button
quickjoin_button.click()
time.sleep(1)
finally:
# Close the browser
driver.quit()
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
# Setup Firefox options
options = Options()
options.binary_location = (
"C:/Program Files/Mozilla Firefox/firefox.exe" # Set the Firefox binary path
)
options.add_argument("--headless") # Run Firefox in headless mode (background)
# Disable the steam:// link prompt by setting preferences
options.set_preference(
"network.protocol-handler.external.steam", True
) # Auto-allow steam:// links
options.set_preference(
"network.protocol-handler.warn-external.steam", False
) # Disable prompt for steam:// links
# Path to your geckodriver (if not in PATH)
geckodriver_path = "C:/Users/ollie/Programs/geckodriver.exe"
# Initialize WebDriver (Firefox)
service = Service(geckodriver_path)
driver = webdriver.Firefox(service=service, options=options)
try:
# Open the website
driver.get("https://www.warmupserver.net/quickjoin.php")
# Wait for the "QuickJoin Europe" button to be clickable
quickjoin_button = WebDriverWait(driver, 10).until(
EC.element_to_be_clickable((By.ID, "quick_eu"))
)
# Click the "QuickJoin Europe" button
quickjoin_button.click()
time.sleep(1)
finally:
# Close the browser
driver.quit()
@Olical
Copy link
Author

Olical commented Mar 19, 2025

You'll of course also need Python installed and have run pip install selenium to fetch the dependency.

@Olical
Copy link
Author

Olical commented Mar 19, 2025

csdm.py doesn't include the faceit AC launch, perfect for https://renown.gg/ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment