Last active
February 15, 2025 08:24
-
-
Save boydaihungst/14e6677e9a2f6d436ab0c47588c500ea to your computer and use it in GitHub Desktop.
laftel api vietnamese sub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub laftel. Tất cả đều dùng GET method: | |
Lấy list series id sort theo gần nhất | |
(limit = 20 offset = 0 tức là 20 bộ gần nhất, offset = 20 là 20 bộ xếp thứ 21-40. Ko nên tăng limit quá cao vì query lâu, để 20-50 thôi) | |
https://api.laftel.tv/v1.0/series/discover/?limit=20&offset=0&ordering=recent_updated | |
Search api keyword search "Headhunter", limit offset tương tự trên, được series id: | |
https://api.laftel.tv/v1.0/series/search/?keyword=Headhunter&limit=25&offset=0 | |
Lấy season id (season id: 131) | |
https://api.laftel.tv/v1.0/seasons?series_id=86 | |
Danh sach ep + ep id + thumbnail url (limit = 20 offset = 0 tức là 20 tập đầu, offset = 20 là tập 21-40. Tăng offset lên 10000 để lấy toàn bộ tập) | |
https://api.laftel.tv/v1.0/episodes/?season_id=131&limit=20&offset=0 | |
Sửa url thumbnail thành dạng này. | |
https://streaming.laftel.tv/2024/12/11677/v1/f5bb8b0aa91f/subtitles/vi.vtt | |
----------------------- Trường hợp url thumbnail khác với pattern trên (Serie id <= 30)---------------------- | |
Cho series nào có thumbnail pattern KHÁC dạng 1: "https://thumbnail.laftel.tv/assets/2024/12/11677/v1/f5bb8b0aa91f/Preview.0000057.jpg" | |
Ví dụ: "Blood Blockade Battlefront" | |
Tạm gọi Dạng 2: "https://thumbnail.laftel.tv/items/portrait/7c939913-8537-41b8-b909-9bb571af1f1d.jpg" | |
Tạm gọi Dạng 3: "https://thumbnail.laftel.tv/assets/2024/01/4041/v1/Preview.0000057.jpg" | |
Season id, vẫn như trên | |
https://api.laftel.tv/v1.0/seasons/?series_id=30 | |
Season id số 30, season id số 47: | |
https://api.laftel.tv/v1.0/series/30/banner/?streaming_type=dash&season_id=47 | |
bỏ `/087ec29ba2f5/highlights/21` là ra sub tập 1, thay `en.vtt` thành `vi.vtt` thì bộ này ko có sub việt lấy tạm sub english làm ví dụ. | |
https://streaming.laftel.tv/2024/01/5802/v1/087ec29ba2f5/highlights/21/subtitles/en.vtt | |
url sub sau khi xoá phần ko liên quan tập 1: https://streaming.laftel.tv/2024/01/5802/v1/subtitles/en.vtt | |
Rồi chạy vòng lặp theo cái index số tập ở đây. Set limit lên 1000 cho lấy toàn bộ series luôn. | |
https://api.laftel.tv/v1.0/episodes/?season_id=47&limit=1000&offset=0 | |
### Dạng 2: | |
Nhìn index ở trên, nếu tập kế tiếp tăng lên 1 đơn vị thì url sub tăng số (chỗ `5802`) lên từng ấy đơn vị | |
Thường là 1 đơn vị à. Ví dụ tập 2: -> `5803` -> https://streaming.laftel.tv/2024/01/5803/v1/subtitles/en.vtt | |
### Dạng 3 tương tự Dạng 1: | |
ep id thay đổi theo từng url từ API danh sách tập: https://api.laftel.tv/v1.0/episodes/?season_id=48&limit=24&offset=0 | |
chỉ cần sửa về thành: (Tập 12 ss2 Blood Blockade Battlefront) https://streaming.laftel.tv/2024/01/4316/v1/subtitles/en.vtt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment