Commit effaccc

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-02-04 08:14:09
fix(ytdlp): filter out generic extractors
1 parent fe359a0
Changed files (1)
src/utils.py
@@ -211,6 +211,7 @@ def is_supported_by_ytdlp(url: str) -> bool:
     if "t.me" in url:  # tg link
         return False
     extractors = gen_extractors()
+    extractors = [e for e in extractors if e.IE_NAME not in {"generic"}]  # filter out generic extractors
     return any(extractor.suitable(url) for extractor in extractors)
 
 
@@ -256,3 +257,4 @@ if __name__ == "__main__":
     print(match_urls("http://a.com/BmT8gZ 匹配不到就删除了https://b.com/MxRdMO"))
     print(is_supported_by_ytdlp("https://www.bilibili.com/video/BV15n61YtEmk"))
     print(is_supported_by_ytdlp("https://t.me/c/1744444199/2475260"))
+    print(is_supported_by_ytdlp("https://test.com/"))