eric7/WebBrowser/AdBlock/AdBlockManager.py

branch
eric7
changeset 8354
12ebd3934fef
parent 8318
962bce857696
child 8356
68ec9c3d4de5
equal deleted inserted replaced
8353:799196d0b05d 8354:12ebd3934fef
15 ) 15 )
16 from PyQt6.QtWebEngineCore import QWebEngineUrlRequestInfo 16 from PyQt6.QtWebEngineCore import QWebEngineUrlRequestInfo
17 17
18 from E5Gui import E5MessageBox 18 from E5Gui import E5MessageBox
19 19
20 from E5Utilities.E5MutexLocker import E5MutexLocker 20 from EricUtilities.EricMutexLocker import EricMutexLocker
21 21
22 from .AdBlockSubscription import AdBlockSubscription 22 from .AdBlockSubscription import AdBlockSubscription
23 from .AdBlockUrlInterceptor import AdBlockUrlInterceptor 23 from .AdBlockUrlInterceptor import AdBlockUrlInterceptor
24 from .AdBlockMatcher import AdBlockMatcher 24 from .AdBlockMatcher import AdBlockMatcher
25 25
147 @param info request info object 147 @param info request info object
148 @type QWebEngineUrlRequestInfo 148 @type QWebEngineUrlRequestInfo
149 @return flag indicating to block the request 149 @return flag indicating to block the request
150 @rtype bool 150 @rtype bool
151 """ 151 """
152 with E5MutexLocker(self.__mutex): 152 with EricMutexLocker(self.__mutex):
153 if not self.isEnabled(): 153 if not self.isEnabled():
154 return False 154 return False
155 155
156 urlString = bytes(info.requestUrl().toEncoded()).decode().lower() 156 urlString = bytes(info.requestUrl().toEncoded()).decode().lower()
157 urlDomain = info.requestUrl().host().lower() 157 urlDomain = info.requestUrl().host().lower()

eric ide

mercurial