mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
reddit: ignore posts from an author with no name
This commit is contained in:
parent
8564fc6990
commit
890b385c03
1 changed files with 8 additions and 0 deletions
|
@ -105,6 +105,14 @@ class RedditNetwork(Network):
|
||||||
def _parse(self,item,is_pm):
|
def _parse(self,item,is_pm):
|
||||||
if not hasattr(item,'author'):
|
if not hasattr(item,'author'):
|
||||||
return
|
return
|
||||||
|
if not hasattr(item.author,'name'):
|
||||||
|
log_warn('author of %s has no name field, ignored' % str(item.id))
|
||||||
|
try:
|
||||||
|
item.mark_as_read()
|
||||||
|
except Exception,e:
|
||||||
|
log_warning('Failed to mark %s as read: %s' % (item.id,str(e)))
|
||||||
|
return
|
||||||
|
|
||||||
author=self.canonicalize(item.author.name)
|
author=self.canonicalize(item.author.name)
|
||||||
if author==self.canonicalize(self.login):
|
if author==self.canonicalize(self.login):
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue