Skip to content

Commit

Permalink
Try to fix #103
Browse files Browse the repository at this point in the history
Nandaka committed Jan 27, 2016
1 parent 4595797 commit 54adc66
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PixivConstant.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: UTF-8 -*-
# pylint: disable=I0011, C, C0302

PIXIVUTIL_VERSION = '20160101-beta1'
PIXIVUTIL_VERSION = '20160127-beta1'
PIXIVUTIL_LINK = 'https://nandaka.wordpress.com/tag/pixiv-downloader/'
PIXIV_URL = 'http://www.pixiv.net'
PIXIV_URL_SSL = 'https://www.secure.pixiv.net/login.php'
10 changes: 9 additions & 1 deletion PixivUtil2.py
Original file line number Diff line number Diff line change
@@ -67,7 +67,13 @@ def download_image(url, filename, referer, overwrite, max_retry, backup_old_file
req = None
try:
try:
print 'Start downloading...',
if not overwrite and not __config__.alwaysCheckFileSize:
print 'Checking local filename...',
if os.path.exists(filename) and os.path.isfile(filename):
return PixivConstant.PIXIVUTIL_SKIP_DUPLICATE

print 'Getting remote filesize...'
# open with HEAD method
req = PixivHelper.createCustomRequest(url, __config__, referer, head=True)
res = __br__.open_novisit(req)

@@ -114,6 +120,7 @@ def download_image(url, filename, referer, overwrite, max_retry, backup_old_file


# actual download
print 'Start downloading...',
req = PixivHelper.createCustomRequest(url, __config__, referer)
res = __br__.open_novisit(req)
downloadedSize = PixivHelper.downloadImage(url, filename, res, file_size, overwrite)
@@ -625,6 +632,7 @@ def process_image(mode, artist=None, image_id=None, user_dir='', bookmark=False,
overwrite = False
if mode == PixivConstant.PIXIVUTIL_MODE_OVERWRITE:
overwrite = True

result = download_image(img, filename, referer, overwrite, __config__.retry, __config__.backupOldFile, image_id, page)

mangaFiles[page] = filename
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
20160101-beta1:
20160127-beta1:
- Try to fix Issue #98.
- Add option to filter image bookmark by tags.
- Update parser.
- Try to fix Issue #103

20151112:
- Fix Issue #96: page 100 is not downloaded for new illust page.

0 comments on commit 54adc66

Please sign in to comment.