DeviantArt - media download helper

DeviantArt - Fix timeout of original image download URLs and help downloading largest available resampled media file. Download filenames are prefixed with artist's name.

Autor
marp
Installationen heute
1
Installationen gesamt
18
Bewertungen
0 0 0
Version
1.0.1
Erstellt am
04.09.2024
Letzte Aktualisierung
12.09.2024
Lizenz
GNU AGPLv3
Wird angewandt auf

This script adds up to two additional download buttons to DeviantArt media posts.

It has been developed with the goal of making the downloading of images easier, but it also works for videos.

The main functions of this script are:

  • Additional button to circumvent 10 minute timeout of DeviantArt download URLs
    Deviations can choose to offer a "Free download" button (downward arrow with thin line underneath). It provides access to the full-sized original media file uploaded by the artist.
    However, the link on this button expires after 10 minutes, requiring a full page refresh to renew it.
    This script adds a button (downwards arrow with thick line underneath) for the original media file that does not expire.
    If "Free download" is not available for a deviation, then the button is not added.

  • Additional button to download best available resampled version of media file
    If a deviation does not offer the "Free download" button, then the only available media options are typically resampled, scaled-down versions of the original media.
    This script adds a button (downwards arrow with two thin lines underneath) to download the best available resampled media option (typically named "fullview" for images).
    This functionality should work for any "art" deviation (image, animated gif, video, etc.).
    Beware animated gif deviations: Most resampled media options from DA are just still images.

  • Modified filename suggestion for download
    This script prefixes the artist's name to the standard DA filename.
    If the deviation is flagged as AI art, then the script also prefixes "AI_", right after the artist prefix.
    Video media is additionally suffixed with the video height, for example "_480p".


  • Informational mouse-over popup for added download buttons
    This script adds media information via a delayed mouse-over popup (the delay is browser-controlled and cannot be changed).
        - media dimension (width x height)
        - file size (not available for resampled images)
        - file type
        - information if original or resampled

Technical notes and limitations:

  • Only designed and tested for the desktop version of DeviantArt's web site.
    This script will likely not work well with the mobile version of the web site.
    That said, it also should not break anything major, either.

  • Download delay
    Often, there will be a delay between clicking a download button and the download executing.
    This might occur especially with videos (the larger the file, the longer the possible delay).
    An additional delay might occur for original downloads (on click, if necessary, the script auto-refreshed expired URLs).

  • No "magic unlocking" of deviations
    DeviantArt protects nearly all media files on server-side via encrypted access tokens.
    If a deviation does not offer original media download, then the script cannot offer it either.
    If a deviation is locked (paid tier, etc.), then the script cannot unlock it.

  • Unreliable AI flag
    Please note that DA's AI flag is not well enforced.
    There are plenty of AI deviations that do NOT have the flag set.
    The script can only act on whatever information it receives from DA.

  • DeviantArt's original "Free download" button will continue to expire
    The original download button (if present) is not modified in any way.
    As such, it will expire exactly the same way as if this script was not run.
    Only the additional buttons added by this script will not expire.

IMPORTANT:
I use Firefox with TamperMonkey.
The script has also been tested briefly with Chrome and TamperMonkey.
It has not been tested with ViolentMonkey (but should work), nor with GreaseMonkey (likely will not work).

Feedback as well as technical advice for further script improvement is welcome.

The script is presented AS-IS with no guarantees.