code: def init(self):
          
          url = 'https://finance.yahoo.com/quote/%s/history' % (self.ticker)
          r = requests.get(url)
          txt = r.content
          cookie = r.cookies['B']
          pattern = re.compile('.*"CrumbStore":\{"crumb":"(?P<crumb>[^"]+)"\}')
  
          for line in txt.splitlines():
              m = pattern.match(line.decode("utf-8"))
              if m is not None:
                  crumb = m.groupdict()['crumb']
                  crumb = crumb.replace(u'\\u002F', '/')
          return cookie, crumb
docs: Returns a tuple pair of cookie and crumb used in the request