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 { ) : Parcelable {
@Ignore @Ignore
@IgnoredOnParcel @IgnoredOnParcel
var searchRuleV: SearchRule? = null private var searchRuleV: SearchRule? = null
@Ignore @Ignore
@IgnoredOnParcel @IgnoredOnParcel
var exploreRuleV: ExploreRule? = null private var exploreRuleV: ExploreRule? = null
@Ignore @Ignore
@IgnoredOnParcel @IgnoredOnParcel
var bookInfoRuleV: BookInfoRule? = null private var bookInfoRuleV: BookInfoRule? = null
@Ignore @Ignore
@IgnoredOnParcel @IgnoredOnParcel
var tocRuleV: TocRule? = null private var tocRuleV: TocRule? = null
@Ignore @Ignore
@IgnoredOnParcel @IgnoredOnParcel
var contentRuleV: ContentRule? = null private var contentRuleV: ContentRule? = null
@Throws(Exception::class) @Throws(Exception::class)
fun getHeaderMap(): Map<String, String> { fun getHeaderMap(): Map<String, String> {

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

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

Loading…
Cancel
Save