pull/48/head
kunfei 5 years ago
parent e2a74af52b
commit 6149fbfdc9
  1. 10
      app/src/main/java/io/legado/app/data/entities/BookSource.kt
  2. 2
      app/src/main/java/io/legado/app/model/Rss.kt
  3. 1
      app/src/main/java/io/legado/app/model/WebBook.kt

@ -48,23 +48,23 @@ data class BookSource(
) : Parcelable {
@Ignore
@IgnoredOnParcel
var searchRuleV: SearchRule? = null
private var searchRuleV: SearchRule? = null
@Ignore
@IgnoredOnParcel
var exploreRuleV: ExploreRule? = null
private var exploreRuleV: ExploreRule? = null
@Ignore
@IgnoredOnParcel
var bookInfoRuleV: BookInfoRule? = null
private var bookInfoRuleV: BookInfoRule? = null
@Ignore
@IgnoredOnParcel
var tocRuleV: TocRule? = null
private var tocRuleV: TocRule? = null
@Ignore
@IgnoredOnParcel
var contentRuleV: ContentRule? = null
private var contentRuleV: ContentRule? = null
@Throws(Exception::class)
fun getHeaderMap(): Map<String, String> {

@ -18,7 +18,7 @@ object Rss {
): Coroutine<MutableList<RssArticle>> {
return Coroutine.async(scope, context) {
val analyzeUrl = AnalyzeUrl(rssSource.sourceUrl)
val body = if (analyzeUrl.useWebView()) {
val body = if (analyzeUrl.useWebView) {
analyzeUrl.getResultByWebView(rssSource.sourceUrl)
} else {
analyzeUrl.getResponseAwait().body()

@ -97,6 +97,7 @@ class WebBook(val bookSource: BookSource) {
headerMapF = bookSource.getHeaderMap()
)
if (analyzeUrl.useWebView) {
bookSource.getContentRule()
analyzeUrl.getResultByWebView(bookSource.bookSourceUrl)
} else {
analyzeUrl.getResponseAwait().body()

Loading…
Cancel
Save