'Return a browser instance used to fetch documents from the web. By default
it returns a `mechanize <https://github.com/jjlee/mechanize>`_
browser instance that supports cookies, ignores robots.txt, handles
refreshes and has a mozilla firefox user agent.
If your recipe requires that you login first, override this method
in your subclass. For example, the following code is used in the New York
Times recipe to login for full access::
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open(\'https://www.nytimes.com/auth/login\')
br.select_form(name=\'login\')
br[\'USERID\']   = self.username
br[\'PASSWORD\'] = self.password
br.submit()
return br'

def get_browser(self, *args, **kwargs):

    if ('user_agent' not in kwargs):
        kwargs['user_agent'] = random_user_agent(allow_ie=False)
    br = browser(*args, **kwargs)
    br.addheaders += [('Accept', '*/*')]
    if self.handle_gzip:
        br.set_handle_gzip(True)
    return br
