{"id":31782094,"url":"https://github.com/pascalgiese/qtcommanderfinder","last_synced_at":"2026-05-14T12:32:24.099Z","repository":{"id":313666767,"uuid":"1051872676","full_name":"pascalgiese/QTCommanderFinder","owner":"pascalgiese","description":"This tool automates the process of finding a commander, looking up budget decks on EDHRec, and exporting a text-based list for use in online simulators or deckbuilding tools like TTS.","archived":false,"fork":false,"pushed_at":"2025-09-24T11:38:06.000Z","size":319,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-24T12:21:11.925Z","etag":null,"topics":["magic-the-gathering","pyqt5","python","scraper","selenium","selenium-stealth"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pascalgiese.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T22:39:06.000Z","updated_at":"2025-09-24T11:38:10.000Z","dependencies_parsed_at":"2025-09-07T18:30:43.649Z","dependency_job_id":"acaa0442-b917-4080-9743-ac38f708a9d1","html_url":"https://github.com/pascalgiese/QTCommanderFinder","commit_stats":null,"previous_names":["pascalgiese/qtcommanderfinder"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/pascalgiese/QTCommanderFinder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalgiese%2FQTCommanderFinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalgiese%2FQTCommanderFinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalgiese%2FQTCommanderFinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalgiese%2FQTCommanderFinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pascalgiese","download_url":"https://codeload.github.com/pascalgiese/QTCommanderFinder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalgiese%2FQTCommanderFinder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003395,"owners_count":26083581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["magic-the-gathering","pyqt5","python","scraper","selenium","selenium-stealth"],"created_at":"2025-10-10T09:14:30.776Z","updated_at":"2025-10-10T09:14:43.342Z","avatar_url":"https://github.com/pascalgiese.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MTG Commander Budget Deck Finder\n\nA simple desktop application built with PyQt5 to help Magic: The Gathering players find budget-friendly Commander/EDH decklists.\n\nThis tool automates the process of finding a commander, looking up budget decks on EDHRec, and exporting a text-based list for use in online simulators or deckbuilding tools.\n\n![App Screenshot](assets/qtcommanderfinder.png)\n\n---\n\n## Features\n\n- **Commander Search**: Find any legal commander using the full [Scryfall Search Syntax](https://scryfall.com/docs/syntax).\n- **Image Display**: Fetches and displays the commander's card image.\n- **Budget Filtering**: Finds decklists on EDHRec and filters them based on a user-defined maximum price.\n- **Automated Scraping**: Uses Selenium with `selenium-stealth` to reliably scrape decklists from popular hosting sites like Moxfield and Archidekt, bypassing bot detection.\n- **Direct-to-Clipboard**: Copies the final, formatted decklist directly to your clipboard.\n\n## How It Works\n\n1.  **Search**: You enter a commander's name. The app queries the Scryfall API to find the card and its EDHRec page.\n2.  **Fetch Decks**: It navigates to the commander's EDHRec page and parses the embedded JSON data to find recent decklists.\n3.  **Filter**: It filters the found decks by the budget you specified.\n4.  **Scrape**: It takes the link to the first matching deck (e.g., on Moxfield or Archidekt) and launches a background Selenium process. `selenium-stealth` is used to avoid being blocked by services like Cloudflare.\n5.  **Extract**: The background worker either parses the embedded page data (for Archidekt) or simulates clicks (for Moxfield) to get to the text export.\n6.  **Copy**: The final decklist is sent back to the main application and copied to your clipboard.\n\n## Setup and Installation\n\nThis project requires Python 3 and a working installation of Google Chrome.\n\n1.  **Clone the repository:**\n    ```sh\n    git clone \u003cyour-repository-url\u003e\n    cd \u003cyour-repository-directory\u003e\n    ```\n\n2.  **Create a virtual environment (recommended):**\n    ```sh\n    python -m venv venv\n    # On Windows\n    venv\\Scripts\\activate\n    # On macOS/Linux\n    source venv/bin/activate\n    ```\n\n3.  **Install the required packages:**\n    Create a `requirements.txt` file with the following content:\n    ```\n    PyQt5\n    requests\n    beautifulsoup4\n    selenium\n    selenium-stealth\n    pyperclip\n    ```\n    Then, install them:\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n4.  **Run the application:**\n    ```sh\n    python qtcommanderfinder.py\n    ```\n\n## Disclaimer\n\nThis tool relies on web scraping from third-party websites (Scryfall, EDHRec, Moxfield, Archidekt). The structure of these websites may change at any time, which could cause the scraping logic to fail. If you encounter issues, the selectors in the `DecklistScraperWorker` class may need to be updated.\n\n## A Note on Responsible Scraping\n\nThis tool is intended for personal, educational use. It is designed to make a limited number of targeted requests and not to overload the servers of the websites it interacts with.\n\n- It uses a realistic `User-Agent` header.\n- It does not perform rapid, repeated requests.\n- It respects the data structures provided by the sites (e.g., `__NEXT_DATA__`) where possible, as this is more efficient and less intrusive than UI interaction.\n\nPlease use this tool responsibly.\n\n## Credits\n\nWindow icon found at [Flaticon](https://www.flaticon.com/free-icons/flash-cards) and was created by manshagraphics","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalgiese%2Fqtcommanderfinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpascalgiese%2Fqtcommanderfinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalgiese%2Fqtcommanderfinder/lists"}