mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 09:39:03 +03:00
fix some parsedanimehttpsource stuff
This commit is contained in:
parent
520499f7d0
commit
e14a5a3510
1 changed files with 4 additions and 10 deletions
|
@ -194,19 +194,13 @@ abstract class ParsedAnimeHttpSource : AnimeHttpSource() {
|
|||
* @param response the response from the site.
|
||||
*/
|
||||
override fun videoUrlParse(response: Response): String {
|
||||
val document = response.asJsoup()
|
||||
return videoUrlFromElement(document.selectFirst(videoUrlSelector()))
|
||||
return videoUrlParse(response.asJsoup())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Jsoup selector that returns the [Element] corresponding to the video URL.
|
||||
*/
|
||||
protected abstract fun videoUrlSelector(): String
|
||||
|
||||
/**
|
||||
* Returns a video URL from the given element.
|
||||
* Returns the absolute url to the source image from the document.
|
||||
*
|
||||
* @param element an element obtained from [videoListSelector].
|
||||
* @param document the parsed document.
|
||||
*/
|
||||
protected abstract fun videoUrlFromElement(element: Element): String
|
||||
protected abstract fun videoUrlParse(document: Document): String
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue