Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pixiv] Single artwork URL does not fire "artworks" postprocessor #2714

Closed
AlttiRi opened this issue Jun 28, 2022 · 2 comments
Closed

[pixiv] Single artwork URL does not fire "artworks" postprocessor #2714

AlttiRi opened this issue Jun 28, 2022 · 2 comments

Comments

@AlttiRi
Copy link

AlttiRi commented Jun 28, 2022

If I download a single illustration URL (like this https://www.pixiv.net/en/artworks/99366671) then

        "pixiv": {
            "artworks": {
                "postprocessors": [{ 

does not work.


The full Pixiv config:

        "postprocessors": [
            {
                "whitelist": ["pixiv"],
                "name": "mtime",
                "event": "file,post"
            },
            {
                "whitelist": ["pixiv"],
                "name": "ugoira",
                "ffmpeg-args": ["-c:v", "libvpx", "-crf", "4", "-b:v", "5000k", "-hide_banner", "-loglevel", "error"],
                "ffmpeg-twopass": true,
                "keep-files": false,
                "mtime": true
            }
        ],

        "pixiv":
        {
            "tags": "translated",
            "directory": ["[gallery-dl]", "[{category}] {user[id]}—{user[name]}"],
            "filename": "[{category}] {user[id]}—{id}—{user[name]}—{date:%Y.%m.%d}—{title}—{num}.{extension}",
            "include": ["background", "artworks"],
            "background": {
                "filename" : "[{category}][bg] {user[id]}—{user[name]}—{date:?//%Y.%m.%d}—{filename[-32:]}.{extension}"
            },
            "avatar": {
                "filename" : "[{category}][ava] {user[id]}—{user[name]}—{date:?//%Y.%m.%d}—{filename[-32:]}.{extension}"
            },
            "artworks": {
                "postprocessors": [{
                    "mtime": true,
                    "directory": "metadata",
                    "filename": "[{category}] {user[id]}—{id}—{user[name]}—{date:%Y.%m.%d}—{title}.html",
                    "name": "metadata",
                    "mode": "custom",
                    "format": "<div id='{id}'><h4><a href='https://www.pixiv.net/artworks/{id}'>{title}</a> by <a href='https://www.pixiv.net/users/{user[id]}'>{user[name]}</a></h4><div class='content'>{caption}</div><hr><div>{user[id]}—{id}—{date:%Y.%m.%d %H:%M:%S}{frames[0][delay]:?<br>Ugoira delay: / ms/}</div><hr><div class='tags'>[\"{tags:J\", \"}\"]</div><hr></div>"
                }]
            }
        },

Downloading a profile URL (https://www.pixiv.net/en/users/7586319) works OK.

I put the meta postprocessor in "artworks.postprocessors" since I don't need to run it on "background" event.

@AlttiRi
Copy link
Author

AlttiRi commented Jun 28, 2022

BTW, what's about to use mtime postprocessor for --ugoira-conv like it is in my config above?

@mikf
Copy link
Owner

mikf commented Jun 28, 2022

The subcategory for single illustration is work, as it has been for a long time.
artworks is for https://www.pixiv.net/en/users/ID/artworks and was introduced only recently when splitting the user extractor to have better control over avatar/background.

$ gallery-dl -E https://www.pixiv.net/en/artworks/99366671
Category / Subcategory
  "pixiv" / "work"

BTW, what's about to use mtime postprocessor for --ugoira-conv like it is in my config above?

Good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants