From 035d882c6f117e125be1290f2444cb808d8673e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 2 Jun 2024 18:11:30 +0200 Subject: [PATCH] [docs:supportedsites] include base categories without instances --- docs/supportedsites.md | 20 ++++++++++++++++++++ scripts/supportedsites.py | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/supportedsites.md b/docs/supportedsites.md index 1e441beb..1818d51b 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -1272,6 +1272,16 @@ Consider all listed sites to potentially be NSFW. Required + + Nitter Instances + + + + + Media Files, Replies, Search Results, Tweets + + + Philomena Instances @@ -1570,6 +1580,16 @@ Consider all listed sites to potentially be NSFW. + + FoOlSlide Instances + + + + + Chapters, Manga + + + Mastodon Instances diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index f3535f1d..c13a1758 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -465,7 +465,7 @@ def build_extractor_list(): """Generate a sorted list of lists of extractor classes""" categories = collections.defaultdict(lambda: collections.defaultdict(list)) default = categories[""] - domains = {} + domains = {"": ""} for extr in extractor._list_classes(): category = extr.category @@ -477,6 +477,9 @@ def build_extractor_list(): domains[category] = domain(extr) else: base = categories[extr.basecategory] + if not extr.instances: + base[""].append(extr.subcategory) + continue for category, root, info in extr.instances: base[category].append(extr.subcategory) if category not in domains: