mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.85k stars 975 forks source link

Pixiv - Return information subverting intent #884

Closed earthyrock closed 4 years ago

earthyrock commented 4 years ago

Morning all.

Weird one (in my eyes, at least). Don't understand why the output (pictures) is being subverted to an unintended location.

BACKGROUND: When used with DeviantArt:

  1. I create a source folder "U:\11Web\gallery-dl\deviantart\name of the artist" and place a .bat file inside. The source folder name will be used as a variable in 2. zzzGallery-dl.bat.txt
  2. I use the .bat file to call c:\program files (x86)\gallery-dl\gallery-dl.exe against "https://www.deviantart.com/%FOLDER%/gallery/all"
  3. It works. The pictures are downloaded into the same source folder as the .bat file. Cool.

PROBLEM: When used with Pixiv:

  1. I create a source folder "U:\11Web\gallery-dl\pixiv\number of the artist" and place a .bat file inside. The source folder name will be used as a variable in 2. zzzGallery-dl.bat.txt
  2. I use the .bat file to call c:\program files (x86)\gallery-dl\gallery-dl.exe against "https://www.pixiv.net/en/users/%FOLDER%/illustrations"
  3. Pictures are downloaded, but into a separate destination folder not of my creation (gallery-dl is creating this folder), instead of the intended same source folder as the .bat file. Examples: Source folder name: 4324875.........Folder to which pictures are downloaded: 4324875 anein20 Source folder name: 45316683.......Folder to which pictures are downloaded: 45316683 user_dxja2885 Source folder name: 19988552.......Folder to which pictures are downloaded: 19988552 canape0130

FACT: The only difference between the respective .bat files is the Web links "https://www.deviantart.com/%FOLDER%/gallery/all"

"https://www.pixiv.net/en/users/%FOLDER%/illustrations"

QUESTION(S): Why are the downloaded pictures being subverted to a location other than the source folder and/or is there a method to turn off the return value of the pixiv user profile information, leaving only the artist number? By leaving only the artist number, the downloaded files drop into the intended source folder. Example, lose: anein20; user_dxja2885; canape0130

ps - Purely as an aside, I see user profile names on the artists pages such as: Yevaldie...vs...returned name user_dxja2885 An/Yogurt...vs...returned name anein20 CANAPE...vs...returned name canape0130 Where are these latter names being pulled from, and is there any method by which the former values can be called/returned instead (Yenaldie; An/Yogurt; CANAPE)?

Thanks SO MUCH for any assistance on this issue.

Hrxn commented 4 years ago

Well, do you have set any specific option for the output directory?

I mean, the standard setting should be basically the same for both extractors here.

https://github.com/mikf/gallery-dl/blob/d769bb4b80b7f1bd6dc0c93e9e9a63aeeefd9b97/gallery_dl/extractor/deviantart.py#L29-L32

https://github.com/mikf/gallery-dl/blob/5b676ea59dfc4d6d70732e656b15d1b41c1ce562/gallery_dl/extractor/pixiv.py#L20-L23

What I'm trying to say, there should be no difference here with regard to any subdirectories created.

Did you try to use the "base" URLs, i.e. without any /gallery/all or /illustrations etc. appended at the end?

And if I may say so, I think what you are doing here is needlessly complicated.

mikf commented 4 years ago

@earthyrock take a look at the filename, directory, and base-directory options on how to set the target directory for downloads.

earthyrock commented 4 years ago

@mikf I added the following line to .conf and that resolved everything: "directory": ["Pixiv", "{user[id]}"],

Thank you!!