self.subreddit_list = subreddit_list
self.praw = praw.Reddit(client_id=secrets.reddit_client_id,
client_secret=secrets.reddit_client_secret,
- user_agent="Yoshiatsu's Kitchen Kiosk by u/yoshiatsu ver 0.1, See http://wannabe.guru.org/svn/kiosk/trunk/reddit_renderer.py")
+ user_agent=secrets.reddit_user_agent)
self.min_votes = min_votes
self.font_size = font_size
self.messages = grab_bag.grab_bag()
msg.thumbnail != "default" and
msg.thumbnail != ""):
content = '<IMG SRC="%s">' % msg.thumbnail
- x = u"""
+ x = """
<TABLE STYLE="font-size:%dpt;">
<TR>
<!-- The number of upvotes or item image: -->
</TD>
</TR>
</TABLE>""" % (self.font_size, content, msg.title, msg.author)
- self.messages.add(x.encode('utf8'))
+ self.messages.add(x)
except:
self.debug_print('Unexpected exception, skipping message.')
else:
self.debug_print('skipped message "%s" for profanity or low score' % (
- msg.title.encode('utf8')))
+ msg.title))
def scrape_reddit(self):
self.deduper.clear()