Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on memberid 5944544 #33

Closed
PixivAddict opened this issue Jun 1, 2014 · 1 comment
Closed

Error on memberid 5944544 #33

PixivAddict opened this issue Jun 1, 2014 · 1 comment
Labels

Comments

@PixivAddict
Copy link

When I downloading artist id 5944544 i get:
Member Url: http://www.pixiv.net/member_illust.php?id=5944544&p=1
Traceback (most recent call last):
File “PixivUtil2.py”, line 420, in process_member
File “PixivModel.pyc”, line 49, in init
File “PixivModel.pyc”, line 69, in ParseInfo
IndexError: list index out of range
Error at processing Artist Info: (, IndexError(‘list index o
ut of range’,), )

@Hamuko
Copy link
Contributor

Hamuko commented Jun 1, 2014

The artist doesn't have any nickname set, so the code fails to find one. Something like this would fix it.

try:
    self.artistName = unicode(page.find('h1', attrs={'class':'user'}).string.extract())
except:
    try:
        self.artistName = unicode(page.findAll(attrs={"class":"avatar_m"})[0]["title"])
    except:
        self.artistName = ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants