def manage_submissions(self):
if not hasattr(self, '<STR_LIT>') or len(self.submissions) == <NUM_LIT:1>:<EOL><INDENT>self.submissions = []<EOL>if self.options['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>if self.options['<STR_LIT:password>'] and self.options['<STR_LIT:username>']:<EOL><INDENT>self.login()<EOL><DEDENT>url = '<STR_LIT>'.format(self.options['<STR_LIT>'])<EOL>self.submissions = self.get_submissions(url)<EOL><DEDENT>elif self.options['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>for subreddit in self.options['<STR_LIT>']:<EOL><INDENT>url = '<STR_LIT>'.format(<EOL>subreddit, self.options['<STR_LIT>'])<EOL>self.submissions += self.get_submissions(url)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>return<EOL><DEDENT>
If there are no or only one submissions left, get new submissions.
This function manages URL creation and the specifics for front page
or subreddit mode.