fix(Fetchers/disable_resources): Fixing the logic for intercepting resources

This commit is contained in:
Karim shoair
2024-12-16 12:35:25 +02:00
parent eceef48ef5
commit d66ebc19a5
+4 -2
View File
@@ -21,7 +21,8 @@ def intercept_route(route: Route):
if route.request.resource_type in DEFAULT_DISABLED_RESOURCES:
log.debug(f'Blocking background resource "{route.request.url}" of type "{route.request.resource_type}"')
route.abort()
route.continue_()
else:
route.continue_()
async def async_intercept_route(route: async_Route):
@@ -33,7 +34,8 @@ async def async_intercept_route(route: async_Route):
if route.request.resource_type in DEFAULT_DISABLED_RESOURCES:
log.debug(f'Blocking background resource "{route.request.url}" of type "{route.request.resource_type}"')
await route.abort()
await route.continue_()
else:
await route.continue_()
def construct_proxy_dict(proxy_string: Union[str, Dict[str, str]]) -> Union[Dict, None]: