aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/source_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'webmentions_ssg/tasks/source_parser.py')
-rw-r--r--webmentions_ssg/tasks/source_parser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/webmentions_ssg/tasks/source_parser.py b/webmentions_ssg/tasks/source_parser.py
index 9cbe071..294402c 100644
--- a/webmentions_ssg/tasks/source_parser.py
+++ b/webmentions_ssg/tasks/source_parser.py
@@ -11,14 +11,14 @@ from fnmatch import fnmatchcase
from itertools import chain
from pathlib import Path
from typing import Any
-from urllib.parse import quote, urldefrag, urljoin, urlsplit
+from urllib.parse import quote, urldefrag, urljoin
import mf2py
import xxhash
from bs4 import BeautifulSoup, Tag
from bs4.element import NavigableString, PageElement
-from ..net import is_http_url
+from ..net import hostname_of, is_http_url
REACTION_PROPERTIES = ("in-reply-to", "like-of", "repost-of", "bookmark-of")
@@ -283,7 +283,7 @@ def iter_targets(
for value in chain(hrefs, reactions):
target = normalize_target(value, base_url=base_url, source_url=source_url)
if target is not None:
- hostname = (urlsplit(target).hostname or "").rstrip(".")
+ hostname = hostname_of(target) or ""
if not any(fnmatchcase(hostname, pattern) for pattern in ignored_hostnames):
yield target