34 thoughts on “pixiv downloader 20110513”

  1. Yet another way to determine manga mode… maybe it’s a little bit faster 😀
    Code:
    ———————————————–
    for a in parseMediumImage.find(‘div’, ‘works_display’).findAll(‘a’):
    空if ‘mode=manga’ in a[‘href’]:
    空空if str(image_id) in a[‘href’]: #this is not necessary
    空空空mangaFlag = True
    空空空print “Mode is Manga, works_display: “, a[‘href’]
    ———————————————-

    Today I just encountered some errors which might be caused by links that contain “mode=manga” and other image_ids.
    For example (image_id):
    illust_id=20005086
    illust_id=20049152
    These two pixiv pages contain both “mode=big” and “mode=manga”.

  2. Thank you, cool utility.

    But a question: Since you’re sharing the source code anyways, is there a reason why this is not this hosted on github or something like that? Sometimes random people pop up and contribute fixes and code there. It helps to keep projects alive…

    Related: What are the conditions associated with using your program? (Can’t see any License file or other conditions…)

    1. I’m planning to (still learning how to use git). As for the license, I still not familiar with any open source license. My program is free to use, modify, and share but keep the source code open and please give credit to me and link back to my blog, maybe something like Creative Commons?

    1. Try to change the default code page in the console to Japanese (932). Run the application, click the icon and select Defaults. Click Options tab and change the codepage to Japanese (932). Press Ok and restart the application. If not working, try to run in from console (start->run->cmd) and type chcp 932 before you run the application from the console (type the full application path+filename)

    2. >Click Options tab and change the codepage to Japanese (932)
      Was already.

      >try to run in from console (start->run->cmd) and type chcp 932 before you run the application from the console
      Same as before. Still only latin and squares. : /

      1. Jeez, now it works. 😀

        I set the font to ‘Raster Font’. No squares anymore. ^^
        I don’t know how to write because the IME is disabled, but it works fine via command line/shortcut.
        “PATHPixivUtil2.exe” -s 3 東方 壁紙

        Lotta work. Thank you very much for your help 🙂

  3. Hello,

    could you give me some instructions on how to enter tags? I don’t have a Japanese Windows :/

    Thank you 🙂

      1. OK I did that, but I still can’t enter japanese text in the console.
        Usually the IME looks like this: http://i1223.photobucket.com/albums/dd503/evocarbon/ime1.png
        But when I select the console/pixiv downloader it looks like this: http://i1223.photobucket.com/albums/dd503/evocarbon/ime2.png

        Copy and paste doen’t work either and with AppLocale everything becomes squares. 🙁
        Can’t you add a feature that reads the tags and set aliases from a specific text file?
        壁紙=wallpaper
        東方=touhou
        ect.
        Then we would only need to enter “wallpaper touhou” to get all images with 壁紙 東方 tags.

        Regards

  4. In the first while loop within processImage() method, it seems that the exception didn’t include some errors caused network problems, say socket.timeout…
    So here’s some of my modification:
    while 1:
    try :
    blah blah blah
    except urllib2.URLError, ue:
    blah blah blah
    except:
    print ‘Retrying…(mediumPage)’
    time.sleep(3)
    continue

  5. what is wrog with this?
    Image #2
    Image id: 9416171
    Processing Image Id: 9416171
    Member id: 1179929
    Member Name:
    Title : 明るい未来5
    Tags : 10点じゃ足りない,さるの,チルノ,フランドール,ルーミア,大妖精,明みら,
    東方,泣いた,漫画
    Manga mode.
    Error at processImage(): (, IndexError(‘list index
    out of range’,), )
    Error at processTags(): (, IndexError(‘list index
    out of range’,), )
    Traceback (most recent call last):
    File “PixivUtil2.py”, line 990, in main
    File “PixivUtil2.py”, line 777, in processTags
    File “PixivUtil2.py”, line 608, in processImage
    IndexError: list index out of range

      1. sometimes it happens all the time
        sometimes it works correctly.
        Mayb servers of pixiv are not stable?

  6. Hello again
    I suggest that this cute programme can add a function which we can choose to download from oldest or newest pics in tag-mode. Downloading from newest pics will create many duplicate pics because of updating of new pics. 🙂

    1. >> Downloading from newest pics will create many duplicate pics because of updating of new pics. 🙂 do you mean from oldest? if it is from the newest, then it should download the new one first (not yet downloaded) and then go to the older one (might have been downloaded), right? Anyway, there is no sorting option from Pixiv for the tag search.

  7. Nice update! is it posible to also add “bookmarks” (bookmark_new_illust.php)?

  8. href: /member_illust.php?mode=medium&illust_id=19194680
    Image #174
    Image id: 19194680
    Processing Image Id: 19194680
    Error at processImage(): (, AttributeError(“‘N
    oneType’ object has no attribute ‘find'”,), )
    Error at processTags(): (, AttributeError(“‘No
    neType’ object has no attribute ‘find'”,), )
    Traceback (most recent call last):
    File “PixivUtil2.py”, line 990, in main
    File “PixivUtil2.py”, line 777, in processTags
    File “PixivUtil2.py”, line 535, in processImage
    AttributeError: ‘NoneType’ object has no attribute ‘find’

    ??

    1. Are you using BeautifulSoup Version 3.1.0.1 ?
      My newly installed debian have 3.1.0.1 as the stable version, which causes this “AttributeError” problem, and I found that the author of BeautifulSoup said this at it’s homepage:
      ” Beautiful Soup version 3.1.0.1 was released January 6, 2009. It won’t work very well—I consider it a failed experiment—but nothing else works with Python 3.0 at all”
      You can use the 3.2.0 version, which worked well for me now.

  9. Any chance of making it put images that are in manga mode into their own directory?

Comments are closed.