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”.
>> illust_id=20005086
>> illust_id=20049152
only see mode=big, when I tried to change to mode=manga, I got an error.
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…)
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?
Doesn’t matter what i choose under [A], either latin letters or squares again. Can’t select the IME. Graaah!
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)
>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. : /
what is your font? can you set it into Arial Unicode or MS Mincho or any font with japanese glyph?
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 🙂
No probs, btw you can try pasting from notepad for entering the tags.
Hello,
could you give me some instructions on how to enter tags? I don’t have a Japanese Windows :/
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
on the second image, can you change the input into hiragana (あ)?
Nope. I can’t click on anything that is highlighted.
change your non-unicode programs setting to Japanese in control panel.
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
Very thanks , Have a good time ^^
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
it is working correctly in my pc, try to download it again?
sometimes it happens all the time
sometimes it works correctly.
Mayb servers of pixiv are not stable?
maybe…. even when I browsing the page, I got error pages (エラー) sometimes.
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. 🙂
>> 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.
Nice update! is it posible to also add “bookmarks” (bookmark_new_illust.php)?
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’
??
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.
forgot which version but I’m still using Python 2.7.x, maybe 3.0.8, will check again later.
Any chance of making it put images that are in manga mode into their own directory?
not in the near future, but if you can add it (the source code is available), please put the patch here 🙂
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”.
>> illust_id=20005086
>> illust_id=20049152
only see mode=big, when I tried to change to mode=manga, I got an error.
On the webpages of these IDs (http://www.pixiv.net/member_illust.php?mode=medium&illust_id=xxxx),
there are links containing “mode=manga” in the description area above the image.
I see, i didn’t see the that one 🙂
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…)
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?
I thought CC is used for sharing articles. For software, GPL,BSD,MIT,Mozilla,Apache,LGPL might be options.
Maybe GPL is good…
ref: http://pbagwl.com/post/5078147450/description-of-popular-software-licenses
Thank you for your help man, but… seriously… 😛
http://i1223.photobucket.com/albums/dd503/evocarbon/pixivdwnld.png
Doesn’t matter what i choose under [A], either latin letters or squares again. Can’t select the IME. Graaah!
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)
>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. : /
what is your font? can you set it into Arial Unicode or MS Mincho or any font with japanese glyph?
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 🙂
No probs, btw you can try pasting from notepad for entering the tags.
Hello,
could you give me some instructions on how to enter tags? I don’t have a Japanese Windows :/
Thank you 🙂
install Japanese IME in you pc, you need the installation cd/dvd. Read this: http://www.declan-software.com/japanese_ime/ or google it 🙂
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
on the second image, can you change the input into hiragana (あ)?
Nope. I can’t click on anything that is highlighted.
change your non-unicode programs setting to Japanese in control panel.
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
Very thanks , Have a good time ^^
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
it is working correctly in my pc, try to download it again?
sometimes it happens all the time
sometimes it works correctly.
Mayb servers of pixiv are not stable?
maybe…. even when I browsing the page, I got error pages (エラー) sometimes.
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. 🙂
>> 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.
Yes, you are right.
http://www.pixiv.net/search.php?s_mode=s_tag&word=%E3%81%84%E3%81%84%E6%9C%80%E7%B5%82%E5%9B%9E%E3%81%A0%E3%81%A3%E3%81%9F&order=date
This is the way that pics list from oldest: &order=date
🙂
Nice update! is it posible to also add “bookmarks” (bookmark_new_illust.php)?
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’
??
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.
forgot which version but I’m still using Python 2.7.x, maybe 3.0.8, will check again later.
Any chance of making it put images that are in manga mode into their own directory?
not in the near future, but if you can add it (the source code is available), please put the patch here 🙂