Add source: OtakusTV [ES]#553
Conversation
Reviewer's GuideAdds a new Spanish anime extension for OtakusTV, including a custom ParsedAnimeHttpSource implementation, a WebView-based server extractor to decode encrypted embed URLs, and the corresponding Gradle module configuration with necessary extractor library dependencies. Sequence diagram for OtakusTV video resolution flowsequenceDiagram
participant AnimeApp
participant OtakusTV
participant OtakusTvServerExtractor
participant StreamWishExtractor
AnimeApp->>OtakusTV: getVideoList(episode)
OtakusTV->>OtakusTvServerExtractor: getEmbedUrls(episode.absoluteUrl, headers)
OtakusTvServerExtractor-->>OtakusTV: List<String> embedUrls
OtakusTV->>OtakusTV: parallelCatchingFlatMap(serverVideoResolver)
loop for each embedUrl
OtakusTV->>OtakusTV: serverVideoResolver(url)
alt url contains streamwish host
OtakusTV->>StreamWishExtractor: videosFromUrl(url, StreamWish)
StreamWishExtractor-->>OtakusTV: List<Video>
else other host
OtakusTV->>OtakusTV: universalExtractor.videosFromUrl(url, headers)
end
end
OtakusTV-->>AnimeApp: List<Video>
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/es/otakustv/src/eu/kanade/tachiyomi/animeextension/es/otakustv/OtakusTV.kt" line_range="111-112" />
<code_context>
+ override fun searchAnimeNextPageSelector(): String = popularAnimeNextPageSelector()
+
+ private fun animeFromElement(element: Element): SAnime = SAnime.create().apply {
+ val link = element.selectFirst("a[href*=/anime/]") ?: element.selectFirst("a")!!
+ setUrlWithoutDomain(link.attr("abs:href"))
+ val img = element.selectFirst("img")
+ title = img?.attr("alt").orEmpty()
</code_context>
<issue_to_address>
**issue (bug_risk):** Using `abs:href` with `setUrlWithoutDomain` can create malformed requests.
`setUrlWithoutDomain` is intended to store a relative path that later gets prefixed with `baseUrl`. Passing a fully qualified `abs:href` risks producing URLs like `https://www.otakustv.nethttps://www.otakustv.net/...`. Normalize to a path-only value (e.g. use `link.attr("href")` or strip scheme/host from `abs:href`) before calling `setUrlWithoutDomain`.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| val link = element.selectFirst("a[href*=/anime/]") ?: element.selectFirst("a")!! | ||
| setUrlWithoutDomain(link.attr("abs:href")) |
There was a problem hiding this comment.
issue (bug_risk): Using abs:href with setUrlWithoutDomain can create malformed requests.
setUrlWithoutDomain is intended to store a relative path that later gets prefixed with baseUrl. Passing a fully qualified abs:href risks producing URLs like https://www.otakustv.nethttps://www.otakustv.net/.... Normalize to a path-only value (e.g. use link.attr("href") or strip scheme/host from abs:href) before calling setUrlWithoutDomain.
There was a problem hiding this comment.
Code Review
This pull request introduces a new extension for OtakusTV, implementing anime and episode parsing along with a custom WebView-based server extractor to handle obfuscated video hoster URLs. The review feedback highlights a few key improvements: using encodedPath to robustly extract slugs without query parameters, simplifying the description selector using Jsoup's :not() pseudo-class, and adding a guard flag in the WebView client to prevent multiple concurrent polling loops when onPageFinished is triggered multiple times.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
isNsfw = true
…ustv/OtakusTV.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ustv/OtakusTV.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Adding a polling flag
Close #545
Checklist:
extVersionCodevalue inbuild.gradlefor individual extensionsoverrideVersionCodeorbaseVersionCodeas needed for all multisrc extensionsisNsfw = trueflag inbuild.gradlewhen appropriateidif a source's name or language were changedweb_hi_res_512.pngwhen adding a new extensionAdd a 👍 reaction to pull requests you find important.
Summary by Sourcery
Add a new Spanish OtakusTV streaming source extension with support for popular, latest, search, details, episodes, and video extraction.
New Features:
Enhancements: