{"id":30792106,"url":"https://github.com/httprunner/video-downloader","last_synced_at":"2025-09-05T15:37:47.320Z","repository":{"id":307941167,"uuid":"1031120294","full_name":"httprunner/video-downloader","owner":"httprunner","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-03T07:09:46.000Z","size":85,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T07:16:12.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/httprunner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-03T03:52:47.000Z","updated_at":"2025-08-03T06:51:04.000Z","dependencies_parsed_at":"2025-08-03T07:32:04.154Z","dependency_job_id":null,"html_url":"https://github.com/httprunner/video-downloader","commit_stats":null,"previous_names":["httprunner/video-downloader"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/httprunner/video-downloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httprunner%2Fvideo-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httprunner%2Fvideo-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httprunner%2Fvideo-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httprunner%2Fvideo-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/httprunner","download_url":"https://codeload.github.com/httprunner/video-downloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httprunner%2Fvideo-downloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273779204,"owners_count":25166748,"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-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2025-09-05T15:37:43.014Z","updated_at":"2025-09-05T15:37:47.305Z","avatar_url":"https://github.com/httprunner.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Video Downloader\n\nA unified video downloader for TikTok, Xiaohongshu (XHS), and Kuaishou platforms built with Go.\n\n## Project Background\n\nThis project is a Go-based unified video downloader that consolidates functionality from three original Python projects:\n\n- [JoeanAmier/TikTokDownloader](https://github.com/JoeanAmier/TikTokDownloader) - TikTok video downloader\n- [JoeanAmier/XHS-Downloader](https://github.com/JoeanAmier/XHS-Downloader) - Xiaohongshu (XHS) downloader\n- [JoeanAmier/KS-Downloader](https://github.com/JoeanAmier/KS-Downloader) - Kuaishou downloader\n\nThe Go implementation provides improved performance, better cross-platform support, and unified functionality across all three platforms. We acknowledge and appreciate the contributions of the original authors.\n\n## Features\n\n- **Multi-platform Support**: Download videos from TikTok, XHS, and Kuaishou\n- **High Quality Downloads**: Download videos in original quality\n- **Batch Processing**: Download multiple videos simultaneously\n- **Progress Tracking**: Real-time download progress with speed and ETA\n- **Resume Support**: Resume interrupted downloads\n- **Proxy Support**: HTTP/HTTPS and SOCKS5 proxy support\n- **Customizable Output**: Flexible file naming and organization\n- **REST API**: HTTP API for integration with other applications\n- **Command Line Interface**: Easy-to-use CLI for manual downloads\n- **Database Storage**: SQLite database for tracking downloads\n\n## Installation\n\n### Prerequisites\n\n- Go 1.21 or higher\n- Git\n\n### Build from Source\n\n```bash\ngit clone https://github.com/httprunner/video-downloader.git\ncd video-downloader\ngo mod download\ngo build -o video-downloader ./cmd/cli\n```\n\n### Install via Go\n\n```bash\ngo install github.com/httprunner/video-downloader@latest\n```\n\n## Configuration\n\nThe application uses a YAML configuration file. Run the following command to create a default configuration:\n\n```bash\nvideo-downloader config init\n```\n\nThis will create a `config.yaml` file in the `./config` directory with default settings.\n\n### Configuration Options\n\n```yaml\nserver:\n  host: 0.0.0.0\n  port: 8080\n  read_timeout: 30\n  write_timeout: 30\n\ndownload:\n  max_workers: 5\n  chunk_size: 1048576  # 1MB\n  timeout: 300\n  retry_count: 3\n  save_path: ./downloads\n  create_folder: true\n  file_naming: \"{platform}_{author}_{title}_{id}\"\n\ndatabase:\n  type: sqlite\n  path: ./data/video-downloader.db\n  max_conns: 10\n\nlog:\n  level: info\n  format: text\n  output: stdout\n\nproxy:\n  enabled: false\n  type: http\n  host: \"\"\n  port: 0\n  username: \"\"\n  password: \"\"\n\nplatforms:\n  tiktok:\n    enabled: true\n    api_key: \"\"\n    cookie: \"\"\n    user_agent: \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\"\n\n  xhs:\n    enabled: true\n    cookie: \"\"\n    user_agent: \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\"\n\n  kuaishou:\n    enabled: true\n    cookie: \"\"\n    user_agent: \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\"\n```\n\n## Usage\n\n### Command Line Interface\n\n#### Download a Single Video\n\n```bash\nvideo-downloader download \"https://www.tiktok.com/@username/video/1234567890\"\n```\n\n#### Download with Custom Options\n\n```bash\nvideo-downloader download \\\n  --output ./my-videos \\\n  --format mp4 \\\n  --quality hd \\\n  \"https://www.tiktok.com/@username/video/1234567890\"\n```\n\n#### Batch Download\n\nCreate a file `urls.txt` with one URL per line:\n\n```\nhttps://www.tiktok.com/@username/video/1234567890\nhttps://www.xiaohongshu.com/explore/abcdef\nhttps://www.kuaishou.com/short-video/ghijkl\n```\n\nThen run:\n\n```bash\nvideo-downloader batch urls.txt\n```\n\n#### Get Video Information\n\n```bash\nvideo-downloader info \"https://www.tiktok.com/@username/video/1234567890\"\n```\n\n#### List Downloaded Videos\n\n```bash\nvideo-downloader list\n```\n\n#### Start API Server\n\n```bash\nvideo-downloader server\n```\n\n### API Usage\n\nStart the server:\n\n```bash\nvideo-downloader server\n```\n\nThe server will be available at `http://localhost:8080`.\n\n#### Endpoints\n\n##### Health Check\n```http\nGET /health\n```\n\n##### Download Video\n```http\nPOST /api/v1/videos/download\nContent-Type: application/json\n\n{\n  \"url\": \"https://www.tiktok.com/@username/video/1234567890\",\n  \"output_path\": \"./downloads\",\n  \"format\": \"mp4\",\n  \"quality\": \"hd\",\n  \"download\": true\n}\n```\n\n##### Batch Download\n```http\nPOST /api/v1/videos/batch\nContent-Type: application/json\n\n{\n  \"urls\": [\n    \"https://www.tiktok.com/@username/video/1234567890\",\n    \"https://www.xiaohongshu.com/explore/abcdef\"\n  ],\n  \"output_path\": \"./downloads\",\n  \"format\": \"mp4\"\n}\n```\n\n##### Get Video Information\n```http\nPOST /api/v1/videos/info\nContent-Type: application/json\n\n{\n  \"url\": \"https://www.tiktok.com/@username/video/1234567890\"\n}\n```\n\n##### List Videos\n```http\nGET /api/v1/videos?platform=tiktok\u0026limit=10\u0026offset=0\n```\n\n##### Get Download Status\n```http\nGET /api/v1/downloads\n```\n\n##### Cancel Download\n```http\nDELETE /api/v1/downloads/{download_id}\n```\n\n##### Get Statistics\n```http\nGET /api/v1/stats\n```\n\n## Supported Platforms\n\n### TikTok\n- Regular video URLs: `https://www.tiktok.com/@username/video/1234567890`\n- Short URLs: `https://vm.tiktok.com/XYZ123`\n- User profile URLs: `https://www.tiktok.com/@username`\n\n### Xiaohongshu (XHS)\n- Explore URLs: `https://www.xiaohongshu.com/explore/abcdef`\n- Discovery URLs: `https://www.xiaohongshu.com/discovery/item/abcdef`\n- User profile URLs: `https://www.xiaohongshu.com/user/profile/abcdef`\n- Short URLs: `https://xhslink.com/abcdef`\n\n### Kuaishou\n- Short video URLs: `https://www.kuaishou.com/short-video/abcdef`\n- Profile URLs: `https://www.kuaishou.com/profile/abcdef`\n- Short URLs: `https://v.kuaishou.com/abcdef`\n\n## File Naming\n\nThe application supports flexible file naming using placeholders:\n\n- `{platform}`: Platform name (tiktok, xhs, kuaishou)\n- `{author}`: Author username\n- `{title}`: Video title\n- `{id}`: Video ID\n- `{date}`: Publication date (YYYY-MM-DD)\n\nExample: `{platform}_{author}_{title}_{id}` → `tiktok_johndoe_My_Video_1234567890.mp4`\n\n## Proxy Configuration\n\nTo use a proxy, update the configuration:\n\n```yaml\nproxy:\n  enabled: true\n  type: http  # http, https, socks5\n  host: proxy.example.com\n  port: 8080\n  username: your_username  # Optional\n  password: your_password  # Optional\n```\n\n## Development\n\n### Project Structure\n\n```\nvideo-downloader/\n├── cmd/\n│   ├── cli/          # CLI entry point\n│   ├── server/       # API server entry point\n│   └── tui/          # TUI interface (future)\n├── internal/\n│   ├── config/       # Configuration management\n│   ├── downloader/   # Download management\n│   ├── extractor/    # Data extraction\n│   ├── platform/     # Platform adapters\n│   │   ├── tiktok/\n│   │   ├── xhs/\n│   │   └── kuaishou/\n│   ├── storage/      # Data storage\n│   └── utils/        # Utility functions\n├── pkg/\n│   ├── models/       # Data models\n│   └── api/          # API definitions\n├── go.mod\n├── go.sum\n└── README.md\n```\n\n### Running Tests\n\n```bash\ngo test ./...\n```\n\n### Building\n\n```bash\n# Build CLI\ngo build -o video-downloader ./cmd/cli\n\n# Build server\ngo build -o video-downloader-server ./cmd/server\n\n# Build for multiple platforms\nGOOS=linux GOARCH=amd64 go build -o video-downloader-linux ./cmd/cli\nGOOS=windows GOARCH=amd64 go build -o video-downloader.exe ./cmd/cli\nGOOS=darwin GOARCH=amd64 go build -o video-downloader-macos ./cmd/cli\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/new-feature`\n3. Commit your changes: `git commit -am 'Add new feature'`\n4. Push to the branch: `git push origin feature/new-feature`\n5. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Disclaimer\n\nThis tool is for educational and personal use only. Please respect the terms of service of the respective platforms and ensure you have the right to download and use the content. The developers are not responsible for any misuse of this tool.\n\n## Support\n\nIf you encounter any issues or have questions, please open an issue on GitHub.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttprunner%2Fvideo-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttprunner%2Fvideo-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttprunner%2Fvideo-downloader/lists"}