Coder Social home page Coder Social logo

lesona-systems / underwolf Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 136 KB

Python script to automate downloading retail World of Warcraft addons from CurseForge & other sites with direct download links. Works on Windows, MacOS, and Linux.

License: BSD 2-Clause "Simplified" License

Python 100.00%
world-of-warcraft automation python selenium-python blizzard-games wow-addon

underwolf's People

Contributors

lesona-systems avatar rafafuentes4 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

underwolf's Issues

Refractor to use a single Selenium instance per download loop / version checking loop

Currently Underwolf starts a new driver (or is written to, I'm digging into Selenium) for each download call. That's not performant. We should be able to use a single visible instance (for downloading addons) and a single headless instance (for version checking) for both parts of the flow - version checking and downloading.

This is poor original code on my part, so we're going to clean it up! Help is welcome ๐Ÿ’ฏ

Utilize Python's tempfile lib instead of explicitly creating a directory and removing it with shutil

Right now, we're explicitly creating a directory in the user's download folder to hold unpacked addons and then manually removing that directory with shutil.rmtree({dir}). While this doesn't necessarily create issues (besides the nuclear qualities of shutil), it does add several points of friction in both code size and execution time. Additionally, it doesn't seem particularly Pythonic.

Suggest utilizing the tempfile Python lib to create a temporary directory for unpacking addons into, and then copying into the /Addons folder in the World of Warcraft directory.

Add --forceupdate arg to download all addons in master list regardless of whether update is needed

I'd love for a '--forceupdate' arg to bypass ALL version checking. This is helpful when doing a fresh install or directly after a big World of Warcraft patch. Currently this can be achieved by zeroing out last_updated in the addon master, but a simple flag would be best.

Right now I'm leaning towards a --forceupdate that will still write 'last_updated' key/values despite downloading the addons without checking that field at all. Love to hear some thoughts RE this.

Eventually legacy.curseforge.com is going to be deprecated, and the new site only has standard dates (just the day/month) available. --forceupdate would be huge here, due to the fact that addon maintainers will upload several builds on the same patch day.

Enable version checking on updated Curseforge website (i.e. "curseforge.com" not "legacy.curseforge.com")

Curseforge has completed a website overhaul, meaning that users can use either legacy.curseforge.com as well as curseforge.com to download their addons. Anything named "legacy" is likely not long for this world, so Underwolf should be capable of ingesting either a legacy URL or a current Curseforge URL and properly do version checking.

There is a slight downside to using Cuseforge.com over legacy.curseforge.com, which is that CF no longer records the exact update time (in epoch) in its front end. That's what we still use for version checking on the legacy site. Instead, CF provides a month, day, and year on its front end, structured as

Month Day, Year

for example:

Jan 29, 2023

This sucks, frankly, but we'll have to work around it. With the recent "--forceupdate" commit, it's more feasible to support both the legacy site as well as the current one.

ElvUI Xpath has changed

Tukui has removed both TukUI and ElvUI versions from the splash page, so we're going to have to change the XPath and anchor links for any Tuk/Elv for version checking to complete successfully.

TukUI/ElvUI do not download

After TukUI's removal of version information on its homepage, TukUI has also changed the download logic for both of its addons. They now require a click on the download button that sends an API call to serve the correct download.

We should implement Selenium's click() function on the download button element.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.