code: def cookies(self, url):
          
          part = urlparse(url)
  
          #if part.port:
          #    _domain = "%s:%s" % (part.hostname, part.port)
          #else:
          _domain = part.hostname
  
          cookie_dict = {}
          now = utc_now()
          for _, a in list(self.cookiejar._cookies.items()):
              for _, b in a.items():
                  for cookie in list(b.values()):
                      # print(cookie)
                      if cookie.expires and cookie.expires <= now:
                          continue
                      if not re.search("%s$" % cookie.domain, _domain):
                          continue
                      if not re.match(cookie.path, part.path):
                          continue
  
                      cookie_dict[cookie.name] = cookie.value
  
          return cookie_dict
docs: Return cookies that are matching the path and are still valid
  
          :param url:
          :return: