Helpviewer/CookieJar/CookieJar.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3057
10516539f238
parent 3035
36e9f388958b
child 3145
a9de05d4a22f
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
243 return False 243 return False
244 244
245 host = url.host() 245 host = url.host()
246 eBlock = self.__isOnDomainList(self.__exceptionsBlock, host) 246 eBlock = self.__isOnDomainList(self.__exceptionsBlock, host)
247 eAllow = not eBlock and \ 247 eAllow = not eBlock and \
248 self.__isOnDomainList(self.__exceptionsAllow, host) 248 self.__isOnDomainList(self.__exceptionsAllow, host)
249 eAllowSession = not eBlock and \ 249 eAllowSession = not eBlock and \
250 not eAllow and \ 250 not eAllow and \
251 self.__isOnDomainList( 251 self.__isOnDomainList(
252 self.__exceptionsAllowForSession, host) 252 self.__exceptionsAllowForSession, host)
253 253
254 addedCookies = False 254 addedCookies = False
255 acceptInitially = self.__acceptCookies != self.AcceptNever 255 acceptInitially = self.__acceptCookies != self.AcceptNever
256 if (acceptInitially and not eBlock) or \ 256 if (acceptInitially and not eBlock) or \
257 (not acceptInitially and (eAllow or eAllowSession)): 257 (not acceptInitially and (eAllow or eAllowSession)):
258 # url domain == cookie domain 258 # url domain == cookie domain
259 soon = QDateTime.currentDateTime() 259 soon = QDateTime.currentDateTime()
260 soon = soon.addDays(90) 260 soon = soon.addDays(90)
261 for cookie in cookieList: 261 for cookie in cookieList:
262 lst = [] 262 lst = []
263 if not (self.__filterTrackingCookies and \ 263 if not (self.__filterTrackingCookies and
264 cookie.name().startsWith("__utm")): 264 cookie.name().startsWith("__utm")):
265 if eAllowSession: 265 if eAllowSession:
266 cookie.setExpirationDate(QDateTime()) 266 cookie.setExpirationDate(QDateTime())
267 if self.__keepCookies == self.KeepUntilTimeLimit and \ 267 if self.__keepCookies == self.KeepUntilTimeLimit and \
268 not cookie.isSessionCookie and \ 268 not cookie.isSessionCookie and \

eric ide

mercurial