{"id":30820856,"url":"https://github.com/oculora-project/oculora","last_synced_at":"2026-05-05T19:32:04.851Z","repository":{"id":311291135,"uuid":"1043087700","full_name":"Oculora-Project/Oculora","owner":"Oculora-Project","description":"Oculora is an unofficial client server for YouTube.","archived":false,"fork":false,"pushed_at":"2025-08-24T08:44:48.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T08:53:42.066Z","etag":null,"topics":["aiocache","fastapi","m3u8","oculora","selenium","uvicorn","youtube","youtube-stream","yt-dlp"],"latest_commit_sha":null,"homepage":"https://notes.yunfie.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oculora-Project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":"Oculora","open_collective":null,"ko_fi":"Oculora","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-08-23T05:42:13.000Z","updated_at":"2025-08-24T08:44:51.000Z","dependencies_parsed_at":"2025-08-24T09:24:52.707Z","dependency_job_id":null,"html_url":"https://github.com/Oculora-Project/Oculora","commit_stats":null,"previous_names":["oculora-project/oculora","yunfie-twitter/oculora"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Oculora-Project/Oculora","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oculora-Project%2FOculora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oculora-Project%2FOculora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oculora-Project%2FOculora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oculora-Project%2FOculora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oculora-Project","download_url":"https://codeload.github.com/Oculora-Project/Oculora/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oculora-Project%2FOculora/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273887923,"owners_count":25185777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiocache","fastapi","m3u8","oculora","selenium","uvicorn","youtube","youtube-stream","yt-dlp"],"created_at":"2025-09-06T10:03:23.069Z","updated_at":"2026-05-05T19:32:04.846Z","avatar_url":"https://github.com/Oculora-Project.png","language":"Python","funding_links":["https://patreon.com/Oculora","https://ko-fi.com/Oculora"],"categories":[],"sub_categories":[],"readme":"# Oculora\n**Oculora Project** は、YouTubeの動画・プレイリスト・チャンネル・コメント情報の取得、HLSストリームのプロキシ配信を行う API サーバーです。 `FastAPI`＋`yt-dlp`を中心に構成され、Seleniumによるコメント取得も対応しています。\n\n\u003e [!WARNING]  \n\u003e **注意:** 現在 Docker 版に不具合が発生しており、正常に動作しません。  \n\u003e 修正が完了するまでの間は、スタンドアローン版をご利用ください。\n\n---\n## 特徴 \n- YouTube動画/プレイリスト情報のREST API提供 \n- HLS (.m3u8)ストリーム/TSセグメントのプロキシ\n- 関連動画・検索・チャンネルメタ情報取得 \n- コメント抽出（Selenium＋Stealthで突破） \n- キャッシュによる高速化 \n- .env＆config.py経由で環境変数による柔軟設定 \n\n---\n\n##  ディレクトリ構成例\n```\nproject_root/  \n├── server.py  \n├── run.py  \n├── requirements.txt  \n├── .env  \n├── .gitignore  \n├── README.md  \n├── config/  \n│ ├── __init__.py  \n│ └── config.py  \n└── routers/  \n├── proxy_handler.py  \n├── batch_handler.py  \n├── playlist_handler.py  \n├── channel_handler.py  \n├── related_handler.py  \n├── transcode_handler.py  \n├── stream_direct_handler.py  \n├── extract_handler.py  \n├── health_handler.py  \n├── comments_handler.py  \n├── search_handler.py  \n└── extractor_util.py\n```\n---\n##  インストール ### 1. 必要パッケージのインストール\n```bash\npip install -r requirements.txt\n```\n### 2. .envファイルの用意 サンプル（必要な項目のみ）:\n```bash\nHOST=0.0.0.0  \nPORT=8000  \nDEBUG=True  \nWORKERS=1  \nLOG_LEVEL=INFO\n```\n### 3. ChromeDriver/Selenium準備 `webdriver-manager`利用で自動ダウンロードされます。 \n- ##  起動方法 (開発用)\n```bash\npython run.py\n```\n- `server.py`または`main.py`がFastAPIエントリポイントです。\n\n---\n\n##  主なAPIエンドポイント\n\n| エンドポイント           | 説明                          | メソッド | 必須パラメータ             |\n|-------------------------|-------------------------------|----------|----------------------------|\n| `/extract`              | 動画メタ＋ストリーム一覧      | GET      | url                        |\n| `/proxy`                | m3u8/TSプロキシ配信           | GET      | url                        |\n| `/stream-direct`        | 単一動画のm3u8URL取得         | GET      | video_url                  |\n| `/transcode`            | MP4変換ストリーム取得         | GET      | video_url                  |\n| `/search`               | YouTube検索                   | GET      | q, limit                   |\n| `/related-videos`       | 関連動画取得                  | GET      | url, limit                 |\n| `/comments`             | コメント抽出                  | GET      | v (動画ID)                 |\n| `/health`               | サーバーヘルス/環境確認       | GET      | なし                       |\n| `/channel-about`        | チャンネル情報取得            | GET      | channel_url                |\n| `/playlist-info`        | プレイリスト一覧メタ取得       | GET      | playlist_url               |\n| `/batch-extract`        | 複数動画ストリーム一括取得     | GET      | urls (カンマ区切り)        |\n\n---\n\n## 詳細なAPIエンドポイント\n```bash\nhttps://localhost:8080/docs\n```\n\n---\n\n## 開発・カスタマイズ\n\n- 設定は `.env` と `config/config.py` で行います。\n  - **APIキー・トークン・環境依存値は必ず.envで管理してください。**\n- 各API分岐は `routers/` 配下に整理されています。\n\n---\n\n##  依存関係\n\n- fastapi\n- uvicorn\n- httpx\n- yt-dlp\n- aiocache\n- selenium\n- webdriver-manager\n- selenium-stealth\n- psutil\n- python-dotenv\n\n---\n\n##  ライセンス \u0026 注意点\n\n- YouTube規約や動画配信に伴う著作権・利用規約を必ず遵守してください。\n- 本コードは教育／研究／検証目的の参考実装です。\n\n---\n\n##  貢献/バグ報告/要望\n\n- [bug_report.md](./bug_report.md) を参考にバグ報告\n- [feature_request.md](./feature_request.md) に新機能要望\n- プルリク/Issue歓迎\n\n---\n\n## 最近の修正\n\n### v1.1.0 (2025-11-27)\n- **TSセグメントプロキシの修正**: m3u8ファイル内のTSセグメントURLが正しくプロキシ経由になるように修正\n- **ログの改善**: プロキシリクエストの詳細ログを追加\n- **エラーハンドリングの強化**: セグメント取得時のエラーハンドリングを改善\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foculora-project%2Foculora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foculora-project%2Foculora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foculora-project%2Foculora/lists"}