Cookie

package
v0.0.0-...-3e0a51a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cookie struct {
	ObjError *mwError.TError // Error Object
	// contains filtered or unexported fields
}

func NewCookie

func NewCookie(errObj *mwError.TError) *Cookie

func (*Cookie) Clear

func (self *Cookie) Clear()

func (*Cookie) Count

func (self *Cookie) Count() int

func (*Cookie) Dump

func (self *Cookie) Dump()

func (*Cookie) GetAllCookie

func (self *Cookie) GetAllCookie() string

func (*Cookie) GetCookie

func (self *Cookie) GetCookie(CookieName string) string

COOKIE 不存在则返回 ""

func (*Cookie) GetSaveCookie

func (self *Cookie) GetSaveCookie() bool

func (*Cookie) LoadCookie

func (self *Cookie) LoadCookie()

func (*Cookie) ParserCookie

func (self *Cookie) ParserCookie(Cookie string)

def gwcInitCookie(self, URL):

res = urllib_parse.urlparse(URL)
# print("返回对象:", res)
# print("域名", res.netloc)
self.SetURL(res.netloc)
if not self.GetSaveCookie():
    self.SetOption(pycurl.COOKIESESSION, True)
    self.SetOption(pycurl.FRESH_CONNECT, True)
else:
    self.SetOption(pycurl.COOKIESESSION, False)
    self.SetOption(pycurl.FRESH_CONNECT, False)
if self.Count() > 0:
    self.SetOption(pycurl.COOKIE, self.GetAllCookie())

func (*Cookie) RemoveSaveCookie

func (self *Cookie) RemoveSaveCookie()

func (*Cookie) SaveCookie

func (self *Cookie) SaveCookie()

func (*Cookie) SetCookie

func (self *Cookie) SetCookie(CookieName string, CookieValue string)

Cookie Name 区分大小写, 查了一下RFC, 没有明确规定

func (*Cookie) SetCookieDir

func (self *Cookie) SetCookieDir(CookieDir string, Automkdir bool)

func (*Cookie) SetSaveCookie

func (self *Cookie) SetSaveCookie(IsSave bool)

func (*Cookie) SetURL

func (self *Cookie) SetURL(URL string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL