├── requirements.txt ├── README.md ├── test.json ├── .github └── workflows │ └── check_repos.yml ├── create_markdown.py ├── repos-db.json ├── ci_check.py └── .gitignore /requirements.txt: -------------------------------------------------------------------------------- 1 | httpx -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cs-repos 2 | Community Cloudstream repositories 3 | 4 | [Show list of repositories](https://rentry.org/cs3-repos) 5 | -------------------------------------------------------------------------------- /test.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Testing repository", 3 | "description": "Lorem ipsum", 4 | "manifestVersion": 1, 5 | "pluginLists": [ 6 | "https://raw.githubusercontent.com/recloudstream/TestPlugins/builds/plugins.json" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.github/workflows/check_repos.yml: -------------------------------------------------------------------------------- 1 | name: Check repos 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Install dependencies 13 | run: | 14 | python3 -m pip install -r requirements.txt 15 | - name: Run checks 16 | run: | 17 | python3 ci_check.py 18 | - name: Update Rentry 19 | if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # Only runs if this CI was triggered by the default branch 20 | run: | 21 | python3 -m pip install rentry 22 | cat list.md | rentry edit -p ${{ secrets.RENTRY_PW }} -u cs3-repos -------------------------------------------------------------------------------- /create_markdown.py: -------------------------------------------------------------------------------- 1 | PREAMBLE = """# Cloudstream 3 Repositories 2 | 3 | !!! warning Keep in mind that the extensions can execute arbitrary code inside the app. 4 | This means you should treat them with the same level of scrutiny you treat any apps. Extensions can also read all of the Cloudstream's data. 5 | The first repo is constantly audited by the app developers so you can probably trust it. 6 | 7 | !!! info Click on Repository Name to Install 8 | 9 | """ 10 | 11 | import os 12 | 13 | def ch_schema(url): 14 | return url.replace("https://","cloudstreamrepo://") 15 | 16 | def write_markdown(repos): 17 | text = PREAMBLE 18 | for repo in repos: 19 | text += f"!!! note [{repo['name']}]({ch_schema(repo['url'])})\n" 20 | text += f"\t{repo['description']}\n\n" 21 | open("list.md","w+",encoding='utf-8').write(text) 22 | -------------------------------------------------------------------------------- /repos-db.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "url": "https://raw.githubusercontent.com/recloudstream/extensions/master/repo.json", 4 | "verified": true 5 | }, 6 | "https://raw.githubusercontent.com/self-similarity/MegaRepo/builds/repo.json", 7 | "https://raw.githubusercontent.com/CranberrySoup/AniyomiCompatExtension/master/repo.json", 8 | "https://raw.githubusercontent.com/NivinCNC/CNCVerse-Cloud-Stream-Extension/refs/heads/builds/CNC.json", 9 | "https://raw.githubusercontent.com/Gian-Fr/ItalianProvider/builds/repo.json", 10 | "https://raw.githubusercontent.com/CakesTwix/cloudstream-extensions-uk/master/repo.json", 11 | "https://raw.githubusercontent.com/techtanic/SkillShare-Repo/builds/repo.json", 12 | "https://raw.githubusercontent.com/maarrem/cs-Kekik/master/repo.json", 13 | "https://raw.githubusercontent.com/SaurabhKaperwan/CSX/builds/CS.json", 14 | "https://git.disroot.org/ayza/FStream/raw/branch/main/repo.json", 15 | "https://raw.githubusercontent.com/phisher98/cloudstream-extensions-phisher/refs/heads/builds/repo.json", 16 | "https://raw.githubusercontent.com/Luna712/Luna712-CloudStream-Extensions/master/repo.json", 17 | "https://raw.githubusercontent.com/redowan99/Redowan-CloudStream/master/repo.json", 18 | "https://raw.githubusercontent.com/aymanbest/Arabico/main/repo.json", 19 | "https://raw.githubusercontent.com/doGior/doGiorsHadEnough/refs/heads/builds/repo.json", 20 | "https://gitlab.com/tearrs/cloudstream-vietnamese/-/raw/main/repo.json", 21 | "https://raw.githubusercontent.com/ycngmn/CuxPlug/refs/heads/main/repo.json", 22 | "https://raw.githubusercontent.com/Bnyro/GermanProviders/refs/heads/master/repo.json", 23 | "https://raw.githubusercontent.com/sarapcanagii/Pitipitii/master/repo.json", 24 | "https://raw.githubusercontent.com/TeKuma25/IndoStream/builds/repo.json", 25 | "https://raw.githubusercontent.com/saimuelbr/saimuelrepo/refs/heads/main/builds/repo.json", 26 | "https://raw.githubusercontent.com/Kraptor123/cs-kraptor/refs/heads/master/repo.json", 27 | "https://raw.githubusercontent.com/redblacker8/storm-ext/refs/heads/builds/repo.json", 28 | "https://raw.githubusercontent.com/rockhero1234/cinephile/refs/heads/builds/repo.json", 29 | "https://raw.githubusercontent.com/michat88/MichatAja/refs/heads/builds/repo.json" 30 | ] 31 | -------------------------------------------------------------------------------- /ci_check.py: -------------------------------------------------------------------------------- 1 | from create_markdown import write_markdown 2 | import httpx 3 | import asyncio 4 | import json 5 | import traceback 6 | 7 | errors = [] 8 | 9 | class JSONWithCommentsDecoder(json.JSONDecoder): 10 | def __init__(self, **kw): 11 | super().__init__(**kw) 12 | 13 | def decode(self, s: str): 14 | s = '\n'.join(l if not l.lstrip().startswith('//') else '' for l in s.split('\n')) 15 | return super().decode(s) 16 | 17 | async def check_plugin_item(url, client): 18 | r = await client.head(url) 19 | assert r.status_code == 200 20 | 21 | async def check_plugin_list(url, client): 22 | r = await client.get(url) 23 | data = r.json() 24 | results = await asyncio.gather(*[check_plugin_item(plugin['url'], client) for plugin in data], return_exceptions=True) 25 | errors.extend([(data[i]['url'],r) for i, r in enumerate(results) if isinstance(r,Exception)]) 26 | 27 | 28 | async def check_repo(url): 29 | async with httpx.AsyncClient(follow_redirects=True) as client: 30 | r = await client.get(url) 31 | data = r.json() 32 | assert data['name'] 33 | assert data['manifestVersion'] 34 | results = await asyncio.gather(*[check_plugin_list(pl_url, client) for pl_url in data['pluginLists']], return_exceptions=True) 35 | errors.extend([(data['pluginLists'][i],r) for i, r in enumerate(results) if isinstance(r,Exception)]) 36 | data['url'] = url 37 | return data 38 | 39 | async def check_all(): 40 | urls = [] 41 | for entry in json.load(open("repos-db.json"), cls=JSONWithCommentsDecoder): 42 | try: 43 | url = "" 44 | if isinstance(entry, str): 45 | url = entry 46 | else: 47 | url = entry['url'] 48 | assert url != "" 49 | urls.append(url) 50 | except Exception as ex: 51 | errors.append(['repos-db.json', ex]) 52 | results = await asyncio.gather(*[check_repo(url) for url in urls], return_exceptions=True) 53 | errors.extend([(urls[i],r) for i, r in enumerate(results) if isinstance(r,Exception)]) 54 | return results 55 | 56 | if __name__ == "__main__": 57 | res = asyncio.run(check_all()) 58 | if len(errors) > 0: 59 | for url, error in errors: 60 | print(f"Error in {url}:") 61 | traceback.print_exception(error) 62 | print("\n") 63 | raise SystemExit(1) 64 | else: 65 | write_markdown(res) 66 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | list.md 2 | 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | *.py[cod] 6 | *$py.class 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | wheels/ 25 | share/python-wheels/ 26 | *.egg-info/ 27 | .installed.cfg 28 | *.egg 29 | MANIFEST 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .nox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *.cover 51 | *.py,cover 52 | .hypothesis/ 53 | .pytest_cache/ 54 | cover/ 55 | 56 | # Translations 57 | *.mo 58 | *.pot 59 | 60 | # Django stuff: 61 | *.log 62 | local_settings.py 63 | db.sqlite3 64 | db.sqlite3-journal 65 | 66 | # Flask stuff: 67 | instance/ 68 | .webassets-cache 69 | 70 | # Scrapy stuff: 71 | .scrapy 72 | 73 | # Sphinx documentation 74 | docs/_build/ 75 | 76 | # PyBuilder 77 | .pybuilder/ 78 | target/ 79 | 80 | # Jupyter Notebook 81 | .ipynb_checkpoints 82 | 83 | # IPython 84 | profile_default/ 85 | ipython_config.py 86 | 87 | # pyenv 88 | # For a library or package, you might want to ignore these files since the code is 89 | # intended to run in multiple environments; otherwise, check them in: 90 | # .python-version 91 | 92 | # pipenv 93 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 94 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 95 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 96 | # install all needed dependencies. 97 | #Pipfile.lock 98 | 99 | # poetry 100 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 101 | # This is especially recommended for binary packages to ensure reproducibility, and is more 102 | # commonly ignored for libraries. 103 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 104 | #poetry.lock 105 | 106 | # pdm 107 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 108 | #pdm.lock 109 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 110 | # in version control. 111 | # https://pdm.fming.dev/#use-with-ide 112 | .pdm.toml 113 | 114 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 115 | __pypackages__/ 116 | 117 | # Celery stuff 118 | celerybeat-schedule 119 | celerybeat.pid 120 | 121 | # SageMath parsed files 122 | *.sage.py 123 | 124 | # Environments 125 | .env 126 | .venv 127 | env/ 128 | venv/ 129 | ENV/ 130 | env.bak/ 131 | venv.bak/ 132 | 133 | # Spyder project settings 134 | .spyderproject 135 | .spyproject 136 | 137 | # Rope project settings 138 | .ropeproject 139 | 140 | # mkdocs documentation 141 | /site 142 | 143 | # mypy 144 | .mypy_cache/ 145 | .dmypy.json 146 | dmypy.json 147 | 148 | # Pyre type checker 149 | .pyre/ 150 | 151 | # pytype static type analyzer 152 | .pytype/ 153 | 154 | # Cython debug symbols 155 | cython_debug/ 156 | 157 | # PyCharm 158 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 159 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 160 | # and can be added to the global gitignore or merged into this file. For a more nuclear 161 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 162 | #.idea/ 163 | --------------------------------------------------------------------------------