mirror of
https://github.com/doms9/iptv.git
synced 2026-06-13 12:26:26 +02:00
e
- misc edits.
This commit is contained in:
parent
9b54e4a7af
commit
00000d9a7b
2 changed files with 10 additions and 8 deletions
|
|
@ -7,7 +7,7 @@ from contextlib import asynccontextmanager
|
|||
from functools import cache, partial
|
||||
from pathlib import Path
|
||||
from typing import TypeVar
|
||||
from urllib.parse import urlparse
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
import httpx
|
||||
from playwright.async_api import (
|
||||
|
|
@ -134,7 +134,7 @@ class Network:
|
|||
|
||||
@staticmethod
|
||||
def to_block(request: Request) -> bool:
|
||||
hostname = (urlparse(request.url).hostname or "").lower()
|
||||
hostname = (urlsplit(request.url).hostname or "").lower()
|
||||
|
||||
return any(
|
||||
hostname == domain or hostname.endswith(f".{domain}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue