-
-
Notifications
You must be signed in to change notification settings - Fork 25
en/Donghuastream: Fix video loading and improve extractors #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
a89cad5
Selector Changes
yogesh090902 16e65fb
Fixed Extractors
yogesh090902 812f94c
Merge branch 'yuzono:master' into master
Yogesh-S-09 6846270
Suggested Changes
yogesh090902 2c24f5d
Suggested Changes 2
yogesh090902 a9e809b
Clone playlist-utils allowing MP4A
cuong-tran 61a5e11
Merge branch 'master' into fork/Yogesh-S-09/donghuastream
cuong-tran d83bfac
Fix build
cuong-tran 8c7d89a
lint
cuong-tran 936e7b8
using UrlUtils to fix url
cuong-tran 50af9f9
Fix PlaylistUtils
cuong-tran 4b1b22e
Fix StreamPlay
cuong-tran 3678b7d
suggestions
cuong-tran 17c35c6
suggestions
cuong-tran 5ae9bd1
Using keiyoushi ParseAs
cuong-tran 30d278f
Merge branch 'master' into fork/Yogesh-S-09/donghuastream
cuong-tran 2b53a25
Merge branch 'master' into fork/Yogesh-S-09/donghuastream
cuong-tran 97fbc8e
bump version
cuong-tran 4342ea8
Migrate new utils
cuong-tran 7cc66d8
Migrate to lib JsUnpacker
cuong-tran 2cbaac2
Fix host & referrer
cuong-tran 64fb9da
Update request body content type and refactor searchAnimeRequest method
cuong-tran 77134af
Donghuastream: Fix Latest & Video loading (#27)
Yogesh-S-09 a6ce214
Merge branch 'master' into donghuastream
cuong-tran e98606e
Refactor hosters preference and update URL extraction logic
cuong-tran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
21 changes: 21 additions & 0 deletions
21
...eam/src/eu/kanade/tachiyomi/animeextension/en/donghuastream/extractors/RumbleExtractor.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package eu.kanade.tachiyomi.animeextension.en.donghuastream.extractors | ||
|
|
||
| import aniyomi.lib.playlistutils.PlaylistUtils | ||
| import eu.kanade.tachiyomi.animesource.model.Video | ||
| import okhttp3.Headers | ||
| import okhttp3.OkHttpClient | ||
|
|
||
| class RumbleExtractor(private val client: OkHttpClient, private val headers: Headers) { | ||
|
|
||
| private val playlistUtils by lazy { PlaylistUtils(client, headers) } | ||
|
|
||
| fun videosFromUrl(url: String, prefix: String = ""): List<Video> { | ||
| val id = extractRumbleId(url) ?: return emptyList() | ||
| val sourceUrl = "https://rumble.com/hls-vod/$id/playlist.m3u8" | ||
| return playlistUtils.extractFromHls(sourceUrl, referer = url, subtitleList = emptyList(), videoNameGen = { q -> "$prefix $q" }) | ||
| } | ||
|
|
||
| private val regex by lazy { Regex("""rumble\.com/embed/v([a-zA-Z0-9]+)""") } | ||
|
|
||
| private fun extractRumbleId(url: String): String? = regex.find(url)?.groupValues?.get(1) | ||
| } |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.