commit
						3f4f516272
					
				| @ -1,5 +1,30 @@ | ||||
| package io.legado.app.model.webbook | ||||
| 
 | ||||
| import io.legado.app.App | ||||
| import io.legado.app.R | ||||
| import io.legado.app.data.entities.Book | ||||
| import io.legado.app.data.entities.BookSource | ||||
| import io.legado.app.model.analyzeRule.AnalyzeUrl | ||||
| 
 | ||||
| object BookInfo { | ||||
| 
 | ||||
|     @Throws(Exception::class) | ||||
|     fun analyzeBookInfo( | ||||
|         book: Book, | ||||
|         body: String?, | ||||
|         bookSource: BookSource, | ||||
|         analyzeUrl: AnalyzeUrl, | ||||
|         isSearch: Boolean = true | ||||
|     ) { | ||||
|         val baseUrl = analyzeUrl.url | ||||
|         body ?: throw Exception( | ||||
|             App.INSTANCE.getString( | ||||
|                 R.string.get_web_content_error, | ||||
|                 baseUrl | ||||
|             ) | ||||
|         ) | ||||
| 
 | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| } | ||||
					Loading…
					
					
				
		Reference in new issue