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?
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)
Latest pixivutil update has fixed my problem. Thank you!
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?
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…
try this update, and set
processfromdb = False
so it can read the user defined directory from the list.txtHow do I make it so it doesn’t download avatar images?
Also, thanks for making this program!
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.Could you add support for multiple picture downloads at a time?
Also, if you want I could design you a lightweight tkinter gui using ttk as well since this is for python 2.7
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.
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.
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.
will checkFound 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())
.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!
can you give me the log file and the list.txt for checking?
Hmm sorry, I already replaced the list.txt with other stuff….
Here’s the log file.
http://pastebin.com/raw.php?i=x8dms4Jn
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?Thank you for this awesome program!
Keep up the great work! ^^
Thanks 🙂
How long it took to update this version?
20110911 – 20110821 =~ 20 days? I don’t really understand your question…
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.
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.