def next(self, fetch: bool = False, next_symbol: _NextSymbol = DEFAULT_NEXT_SYMBOL) -> _Next:
def get_next():<EOL><INDENT>candidates = self.find('<STR_LIT:a>', containing=next_symbol)<EOL>for candidate in candidates:<EOL><INDENT>if candidate.attrs.get('<STR_LIT>'):<EOL><INDENT>if '<STR_LIT>' in candidate.attrs.get('<STR_LIT>', []):<EOL><INDENT>return candidate.attrs['<STR_LIT>']<EOL><DEDENT>for _class in candidate.attrs.get('<STR_LIT:class>', []):<EOL><INDENT>if '<STR_LIT>' in _class:<EOL><INDENT>return candidate.attrs['<STR_LIT>']<EOL><DEDENT><DEDENT>if '<STR_LIT>' in candidate.attrs['<STR_LIT>']:<EOL><INDENT>return candidate.attrs['<STR_LIT>']<EOL><DEDENT><DEDENT><DEDENT>try:<EOL><INDENT>return candidates[-<NUM_LIT:1>].attrs['<STR_LIT>']<EOL><DEDENT>except IndexError:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>__next = get_next()<EOL>if __next:<EOL><INDENT>url = self._make_absolute(__next)<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>if fetch:<EOL><INDENT>return self.session.get(url)<EOL><DEDENT>else:<EOL><INDENT>return url<EOL><DEDENT>
Attempts to find the next page, if there is one. If ``fetch``
        is ``True`` (default), returns :class:`HTML <HTML>` object of
        next page. If ``fetch`` is ``False``, simply returns the next URL.