Pixiv Downloader 20100722

UPDATED in here.

Changelog 20100722:

  • Add menu selection, download by member_id, image_id, tags, or list.
  • Search by tags, somehow (my) windows (7) console cannot accept japanese font? so currently only accept ascii character, except someone can tell me how to do it…
  • Add error checking message from with0out.

Download link here, source code here.

Pixiv changed the CSS, so a little update to reflect it 🙂

Change log:

  • Update css selector
  • Add retry and retrywait in the config.ini, used for defining connection retry when downloading, 0 means no retry.

Download link here.

21 thoughts on “Pixiv Downloader 20100722”

  1. Is there a way to try to download from a user you’ve already batch downloaded from before, to get any new images they might have uploaded? When I try to, the program crashes.

    1. Nevermind, I’m getting an error no matter what user id I try to download. This is my error;
      Error at processMember(): (, TypeError(“‘NoneType’
      object is not callable”,), )
      failed
      Traceback (most recent call last):
      File “PixivUtil2.py”, line 582, in main
      File “PixivUtil2.py”, line 258, in processMember
      TypeError: ‘NoneType’ object is not callable
      press enter to exit.

      1. Ahh, that version works perfect! Thank you, you’ve done a great job with this program!

  2. Nandaka, your e-mail was [edited :)], right? I have sent you a mail, check your spam…

  3. I LOVE THIS. Thank you.

    I will be donating to you as soon as I have a paypal account.

  4. Is it possible to have all the pictures from a certain tag on auto download, instead of having to press enter each time? Would totally want to download lots of stuff while I sleep.

    1. Nope, but you can load all the post (or set the limit to 1000? some of the boards have hard limit for listing.) and select all for batch download. If the *booru supporting xml, then you can see the total post on the status bar.

  5. I just recently discovered your pixiv batch downloader^^ It definitely saves me time from saving pictures one-by-one. Thank you so much for this!

  6. I have a few other comments regarding file renaming issues.

    Disclaimer: I have little to no experience as a Python programmer.

    Yavos mentioned in an earlier post (http://nandaka.wordpress.com/2010/07/15/pixiv-downloader-20100714/#comments) about HTML entities showing up in file names. I have seen it several times. Certain characters, such as the ampersand(&) are being saves as the HTML character entity &amp; but others, such as the apostrophe(‘), as Yavos tried to demonstrate, is being saved at the decimal HTML encoded entity '. I’ve also seen &gt; > and &lt; < characters. I imagine these are being encoded in this way because of their special meanings in code. Maybe you could do a final pass at unescaping the entities in the name at the end of your sanitizeFilename function. Something like what is described here (http://groups.google.com.au/group/comp.lang.python/msg/f77f2093ff48331d)?

    In addition to the error handling you’ve introduced, can you include an option to download the medium version of an image if available when attempting to download the large image gives a 404? Maybe you can append ‘_medium’ to the name so it’s clear that it’s not the expected large image.

    Also, the single feature I would like to see is an option to handle the manga like ank’s pixiv tool where a directory is created with the name which is normally given to the file name, and then the images in the sequence are placed within it, starting from 01.ext.

    Thanks again for all your diligent work. Please continue to include the source! ^^

    1. >> HTML character entities
      Will try!

      >> 404 and medium image
      haven’t encounter this, but can be done.

      >> manga mode
      will see about it.

  7. Thanks for continuing to post the source. I am using a Mac, so it’s the only way I can use new versions. Actually, there was an issue I was having related to Unix systems which I had been working around but I now have a fix for.

    Since Unix systems use ‘/’ as a directory delimiter instead of the ” on Windows, the Downloader was not renaming my filenames properly when I had a ‘/’ in the filenameformat string.

    I’m going to try to post some code here, but I don’t know if your wordpress configuration allows for HTML tags. This may turn out horribly…


    Changes in source of PixivUtil2.py from 20100722
    Line 50: removed |/
    New Line is: __badchars__ = re.compile(r'^.|.$|^ | $|^$|?|:||||*|'')

    Lines 75,76 & 80: added .replace('/','_')
    New Lines:
    nameformat = nameformat.replace('%artist%',artist.replace('\','_').replace('/','_'))
    nameformat = nameformat.replace('%title%',title.replace('\','_').replace('/','_'))
    nameformat = nameformat.replace('%tags%',tags.replace('\','_').replace('/','_'))

    That’s probably not the most elegant way of handling it but it works for me.

  8. This is awesome!
    Thank you so much!

    Do you think you will ever add the ability to DL all images with a specific tag? Some tags have thousands of images. I feel that if I were able to get them all into the same folder, I can browse through them later on — and possibly find new artists at the same time.

    In any case, Thanks so much for the hard work you put into this!

    1. Tried, but windows console cannot accept japanese/unicode character, so it is limited to ascii character (at least when I tried by copy-paste from browser to console).

      anyway, I’ve coded the search by tags in the pixiv downloader, will upload after testing uploaded.

  9. thank you, i’ve set last updated = 0 and uselist = True (it was set to False) maybe that was the issue, thank you soo much, i really appreciate your help and dedication 🙂

    Thank you

  10. Hey there i’ve just downloaded the updated version thank you!
    But after i log in nothing happens except the following:

    processing list from database.
    done.
    press enter to exit

    any help would be great

    1. check the config.ini, try to set last update date to 0. check list.txt, see if there is some entry or try to add new entry.

  11. You’re super dedicated; I noticed the new layout, checked the old program to see if it worked, came here when it did not, updated and got things working again all within the span of 5 minutes. Thank you!

Comments are closed.