fix parsing of username in comments
This commit is contained in:
parent
cea58c23e4
commit
406475d7b9
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ class Comment(object):
|
||||||
self.username = None
|
self.username = None
|
||||||
else:
|
else:
|
||||||
self.author = unicode(a.text)
|
self.author = unicode(a.text)
|
||||||
self.username = unicode(a.attrib['href'].lstrip('/users/'))
|
self.username = unicode(a.attrib['href'].split('/')[2])
|
||||||
self.date = datetime.strptime(select(div.find('p'), 'time', 1).attrib['datetime'].split('+')[0],
|
self.date = datetime.strptime(select(div.find('p'), 'time', 1).attrib['datetime'].split('+')[0],
|
||||||
'%Y-%m-%dT%H:%M:%S')
|
'%Y-%m-%dT%H:%M:%S')
|
||||||
self.date = local2utc(self.date)
|
self.date = local2utc(self.date)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue