nebius/SWE-bench-extra huggingface dataset:
Repository: hhursev/recipe-scrapers

Issue:
[feature] Get list of supported urls
When integrating this into other programs, it would be nice to get a current list of supported urls from this package, ideally even with a flag that shows whether it works by schema or custom parsing. If I am correct, the only way to test this would currently either be hand-parsing the readme or trying the url without and with wild-mode and interpreting the results, right? Or have I missed something?

This library looks very promising, thanks for your work. I would also be willing to implement this and more parsers as well. 

Comments:

Patch:
diff --git a/recipe_scrapers/__init__.py b/recipe_scrapers/__init__.py
index 77547339..74a95f39 100644
--- a/recipe_scrapers/__init__.py
+++ b/recipe_scrapers/__init__.py
@@ -472,6 +472,15 @@ SCRAPERS = {
 }
 
 
+def get_supported_urls() -> set[str]:
+    return set(SCRAPERS.keys())
+
+
+def scraper_exists_for(url_path: str) -> bool:
+    host_name = get_host_name(url_path)
+    return host_name in get_supported_urls()
+
+
 def scrape_me(url_path: str, **options: dict[str, Any]) -> AbstractScraper:
     host_name = get_host_name(url_path)
 


Test patch:
diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml
index 43a0f7e6..4a299907 100644
--- a/.github/workflows/unittests.yaml
+++ b/.github/workflows/unittests.yaml
@@ -43,10 +43,10 @@ jobs:
         with:
           # coveralls repo token
           github-token: "SmlfzlVJy4ow55rduU7IU5GmmFCfAdGeq"
-      - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
+      - if: ${{ !github.event.pull_request.head.repo.fork }} && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
         name: Create coverage xml report (needed for codacy)
         run: pip install coverage && coverage xml
-      - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
+      - if: ${{ !github.event.pull_request.head.repo.fork }} && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
         name: Report code coverage to codacy
         uses: codacy/codacy-coverage-reporter-action@v1
         with:
diff --git a/tests/library/test_main_methods.py b/tests/library/test_main_methods.py
new file mode 100644
index 00000000..e85ab439
--- /dev/null
+++ b/tests/library/test_main_methods.py
@@ -0,0 +1,19 @@
+import unittest
+
+from recipe_scrapers import get_supported_urls, scraper_exists_for
+from recipe_scrapers._utils import get_host_name
+
+
+class TestMainMethods(unittest.TestCase):
+    def test_get_supported_urls(self):
+        urls = get_supported_urls()
+        self.assertGreater(len(urls), 200)
+        self.assertIn(get_host_name("https://www.hellofresh.nl/"), urls)
+        self.assertIn(get_host_name("https://hellofresh.com/"), urls)
+
+    def test_scraper_exists_for(self):
+        self.assertFalse(scraper_exists_for("example.com"))
+        self.assertTrue(scraper_exists_for("https://www.hellofresh.nl/"))
+        self.assertTrue(
+            scraper_exists_for("https://eatsmarter.de/rezepte/gruenkohl-kokos-suppe")
+        )