Skip to content

Commit

Permalink
Found a rare error that was not resolved temporarily, V2.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Neod0Matrix committed Feb 11, 2019
1 parent 6af40d0 commit 0a56c9e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ License
Update
======

Version: 2.9.4
Last Update Time: 20190130pm1423
Version: 2.9.5
Last Update Time: 20190211pm2246

This python crawler is built to crawl pixiv images
It have two mode: RankTopN and illustRepoAll
Expand Down
2 changes: 1 addition & 1 deletion dataload.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DEVELOPER = 'Neod Anderjon(LeaderN)'
LABORATORY = 'T.WKVER'
ORGANIZATION = '</MATRIX>'
VERSION = '2.9.4'
VERSION = '2.9.5'

# logfile log real-time operation
base_time = time.time()
Expand Down
12 changes: 10 additions & 2 deletions modeoption.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,16 @@ def gather_preloadinfo(self):
# id list result may include some garbages, use number regex get pure result
number_pattern = re.compile(dataload.NUMBER_REGEX, re.S)
for index in ajax_idlist:
one_pure_id = re.findall(number_pattern, index)[0]
self.pure_idlist.append(one_pure_id)
one_pure_id = re.findall(number_pattern, index)
if one_pure_id:
self.pure_idlist.append(one_pure_id[0])
else:
# very rare error, only happening in this address:
# https://www.pixiv.net/member_illust.php?id=15115322
log_context = 'Get ajax page valid info failed, exit'
self.pvmx.logprowork(self.logpath, log_context)
exit(-1)

# use quick-sort algorithm to handle id number
# descending order sort
pure_idlist_nbr = []
Expand Down
2 changes: 1 addition & 1 deletion privmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PixivAPILib:
| ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝╚═╝╚═╝ |
| |
| Copyright (c)2018 T.WKVER </MATRIX> Neod Anderjon(LeaderN) |
| Version: 2.9.4 LTE |
| Version: 2.9.5 LTE |
| Code by </MATRIX>@Neod Anderjon(LeaderN) |
| PixivCrawlerIII Help Page |
| 1.rtn --- RankingTopN, crawl Pixiv daily/weekly/month ranking top artworks |
Expand Down

0 comments on commit 0a56c9e

Please sign in to comment.