Pixiv Downloader 20110911b

Change log:

  • Update Login process.
  • Add filesize checking when downloading avatar image.
  • Change the parser from mechanize.DefaultFactory() to mechanize.RobustFactory(). For downloading still using the default factory because there is a problem (ValueError: invalid literal for int() with base 10: ‘some_chars’) if using robust factory (20110911b)
  • Fix artist token parser when there is no profile image (20110911b)

Download link here here, source code here here. Donation please!

note: some people have donate to my PayPal account, should I write their name/email/amount in this blog?

23 thoughts on “Pixiv Downloader 20110911b”

  1. I’ve donated and I’d rather my email address and name stay private.
    Thanks for making this tool, it’s nice to be able to easily save the works of artists i like.
    (It’s nice to have the source code available, even though I’m not a programmer)

  2. Hello.

    I was following the instructions in the readme file.

    I put this in my list.txt: “123456 F:new Foldertest”

    Then I get this error when I run the app. “‘123456 F:\\new Folder\\test\ n'”,), )”
    The backslashes actually appeared as yen signs in the app window. (Has something to do with japanese locale?)

    I do have an F: Drive.

    What could be the problem?

    1. Japanese locale doesn’t matter (I’m also running in Japanese Locale). Did you put the quotation mark inside the list.txt, because mine is working.Quotation mark doesn’t matter.
      Can you try to use rootdirectory option in the config.ini and just put the member_id in the list.txt (only the number and separate each member_id in new line).

      The format member_id+folder have some bug (I can download and the file is in the given path, but have wrong format). UPDATE: Fixing it now…

  3. How do I make it so it doesn’t download avatar images?
    Also, thanks for making this program!

    1. currently there is no setting for not downloading the avatar/folder.jpg. If you are using the source, you can find this line: avatarDownloaded = False and set it into True in the PixivUtil2.py. I will add the option in the config.ini later.

    1. Also, if you want I could design you a lightweight tkinter gui using ttk as well since this is for python 2.7

      1. No, I don’t want to do that. I prefer console app, which is much simpler and do the job. Most of the time I’m just run and let it finish, so no benefit for me to add a GUI. But if you want to create it, you can use my PixivModel.py for the artist/image page parser.

    2. I’m not planning to do multi-threading, because it will increase the complexity very much (thread synchronization, etc) and will cause very high load on the pixiv server. So not for now.

  4. when I try to download imageid 14245299, I get a parse error.

    Image id: 14245299
    Processing Image Id: 14245299
    image_id OK
    Title: Go to school>///<!
    Tags :
    Mode : big
    Error at processImage(): (, ParseError(SGMLP
    arseError(‘expected name token at “<!';\npixiv.context.u"',),), )
    Traceback (most recent call last):
    File “PixivUtil2.py”, line 865, in main
    File “PixivUtil2.py”, line 532, in processImage
    File “mechanize_mechanize.pyc”, line 569, in follow_link
    File “mechanize_mechanize.pyc”, line 553, in click_link
    File “mechanize_mechanize.pyc”, line 618, in find_link
    File “mechanize_mechanize.pyc”, line 644, in _filter_links
    File “mechanize_html.pyc”, line 42, in __call__
    File “mechanize_html.pyc”, line 192, in links
    ParseError: expected name token at “<!';npixiv.context.u"
    press enter to exit.

    1. will check Found the problem. It is cause by the title (‘Go to school>///<!‘), the parser expecting the complete form for html comment (), but only found ‘<!', that why it is complaining. I will upload the updated one later, but if you using the script from the source, you can fix it by changing __br__ = Browser() to __br__ = Browser(factory=mechanize.RobustFactory()).

  5. Hi. This program is awesome, but I’m having a problem.

    When it’s downloading, from member_id’s in list.txt, it’s downloading all the pictures fine, but after each pic is downloaded, this comes up:

    “Bytes Error at downloadImage: <, IO Error, <traceback object at 0x0(bunch of hex values, I'm guessing?) "

    The hex values are different each time. The pictures are being downloaded fine at the right directory, but this keeps coming up.

    after, it counts up to 4, then says:

    Start downloading… File exist!

    How can I fix this?
    Thanks!

        1. I see a lot of IOError: No such file or directory. Can you verify if the directory created correctly (for example: D:jrulerpixivutil20110911picsblueberry (156603))? Can I see your config.ini for the filenameformat?

      1. I mean how long it took to update the Login process, or how long did you work with this version in hours?
        For example, creating a screensaver might take 4h of work.

        1. For the Login process: less than 1 man-hour since I read the comment mentioning the problem. The Login process very simple because the library I’m using (mechanize::Browser) already providing the method, I only need to select the correct form to process.

Comments are closed.