Get cookie object by cookie name.
544962
public Cookie getCookieObject(String name) {
		Cookie[] cookies = request.getCookies();
		if (cookies != null)
			for (Cookie cookie : cookies)
				if (cookie.getName().equals(name))
					return cookie;
		return null;
	}
1021560
def parse_cookies(self, req, name, field):
        """"""
        cookies = self._cache.get("cookies")
        if cookies is None:
            self._cache["cookies"] = cookies = req.cookies
        return core.get_value(cookies, name, field)
890506
def get_cookie_value(self, cookie=None, cookie_name=None):
        
        if cookie_name is None:
            cookie_name = self.default_value['name']

        if cookie is None or cookie_name is None:
            return None
        else:
            try:
                info, timestamp = parse_cookie(cookie_name, self.sign_key, cookie,
                                               self.enc_key, self.sign_alg)
            except (TypeError, AssertionError):
                return None
            else:
                value, _ts, typ = info.split("::")
                if timestamp == _ts:
                    return value, _ts, typ
        return None
365741
def getCookies(self):
        '''
        
        '''
        items = self.data
        for item in items:
            if 'cookie' in item or 'Cookie' in item:
                cookies = SimpleCookie(item[7:])
                return {i.key: i.value for i in cookies.values()}
        return {}
255769
def cookiestring(self, value):
        """""""
        c = Cookie.SimpleCookie(value)
        sc = [(i.key, i.value) for i in c.values()]
        self.cookies = dict(sc)
1036843
def parse_cookies_str(cookies):
    
    cookie_dict = {}
    for record in cookies.split(";"):
        key, value = record.strip().split("=", 1)
        cookie_dict[key] = value
    return cookie_dict
455662
function(name) {
		var cookie = document.cookie, e, p = name + "=", b;

		if ( !cookie )
			return;

		b = cookie.indexOf("; " + p);

		if ( b == -1 ) {
			b = cookie.indexOf(p);

			if ( b != 0 )
				return null;

		} else {
			b += 2;
		}

		e = cookie.indexOf(";", b);

		if ( e == -1 )
			e = cookie.length;

		return decodeURIComponent( cookie.substring(b + p.length, e) );
	}
810736
public final static Cookie getCookie(HttpServletRequest httpServletRequest, String name) {
		final Map<String, Cookie> cookieMap = readCookieMap(httpServletRequest);
		return cookieMap == null ? null : cookieMap.get(name);
	}
411953
def cookiejar_from_dict(*cookie_dicts):
    
    cookie_dicts = tuple((d for d in cookie_dicts if d))
    if len(cookie_dicts) == 1 and isinstance(cookie_dicts[0], CookieJar):
        return cookie_dicts[0]
    cookiejar = CookieJar()
    for cookie_dict in cookie_dicts:
        if isinstance(cookie_dict, CookieJar):
            for cookie in cookie_dict:
                cookiejar.set_cookie(cookie)
        else:
            for name in cookie_dict:
                cookiejar.set_cookie(create_cookie(name, cookie_dict[name]))
    return cookiejar
155638
public function get($name = '')
    {
        $result = '';
        if (isset($_COOKIE[$name])) {
            $result = $_COOKIE[$name];
        }

        return $result;
    }
757249
public static Cookie getCookie(HttpServletRequest request, String name) {
    Cookie[] cookies = request.getCookies();
    Cookie returnCookie = null;

    if (cookies == null) { return returnCookie; }
    for (int i = 0; i < cookies.length; i++) {
      Cookie thisCookie = cookies[i];
      if (thisCookie.getName().equals(name) && !thisCookie.getValue().equals("")) {
        returnCookie = thisCookie;
        break;
      }
    }
    return returnCookie;
  }
799530
def from_response(cls, header_data, ignore_bad_cookies=False,
                      ignore_bad_attributes=True):
        ""
        cookies = cls()
        cookies.parse_response(
            header_data,
            ignore_bad_cookies=ignore_bad_cookies,
            ignore_bad_attributes=ignore_bad_attributes)
        return cookies
1254826
public function getCookie($name = '')
    {
        if (isset(CookieContainer::getCookies()[$name])) {
            return CookieContainer::getCookies()[$name];
        } else {
            return false;
        }
    }
1109047
def _load_cookie(self):
        """"""

        cookie = SimpleCookie(self._environ.get('HTTP_COOKIE'))
        vishnu_keys = [key for key in cookie.keys() if key == self._config.cookie_name]

        # no session was started yet
        if not vishnu_keys:
            return

        morsel = cookie[vishnu_keys[0]]
        morsel_value = morsel.value

        if self._config.encrypt_key:
            cipher = AESCipher(self._config.encrypt_key)
            morsel_value = cipher.decrypt(morsel_value)

        received_sid = Session.decode_sid(self._config.secret, morsel_value)
        if received_sid:
            self._sid = received_sid
        else:
            logging.warn("found cookie with invalid signature")
1153720
function(_name){
            var _cookie = document.cookie,
                _search = '\\b'+_name+'=',
                _index1 = _cookie.search(_search);
            if (_index1<0) return '';
            _index1 += _search.length-2;
            var _index2 = _cookie.indexOf(';',_index1);
            if (_index2<0) _index2 = _cookie.length;
            return _cookie.substring(_index1,_index2)||'';
        }
360698
public HttpCookie getCookie(String name) {
        if (null == name || 0 == this.parsedList.size()) {
            return null;
        }
        for (HttpCookie cookie : this.parsedList) {
            if (cookie.getName().equals(name)) {
                return cookie;
            }
        }
        return null;
    }
379316
def cookies(self) -> Dict[str, http.cookies.Morsel]:
        """"""
        return self.request.cookies