|
|
@ -60,11 +60,9 @@ object BookChapterList { |
|
|
|
} else if (chapterData.nextUrl.size > 1) { |
|
|
|
} else if (chapterData.nextUrl.size > 1) { |
|
|
|
val chapterDataList = arrayListOf<ChapterData<String>>() |
|
|
|
val chapterDataList = arrayListOf<ChapterData<String>>() |
|
|
|
for (item in chapterData.nextUrl) { |
|
|
|
for (item in chapterData.nextUrl) { |
|
|
|
if (!nextUrlList.contains(item)) { |
|
|
|
|
|
|
|
val data = ChapterData(nextUrl = item) |
|
|
|
val data = ChapterData(nextUrl = item) |
|
|
|
chapterDataList.add(data) |
|
|
|
chapterDataList.add(data) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (item in chapterDataList) { |
|
|
|
for (item in chapterDataList) { |
|
|
|
withContext(coroutineScope.coroutineContext) { |
|
|
|
withContext(coroutineScope.coroutineContext) { |
|
|
|
val nextResponse = AnalyzeUrl(ruleUrl = item.nextUrl, book = book).getResponseAsync().await() |
|
|
|
val nextResponse = AnalyzeUrl(ruleUrl = item.nextUrl, book = book).getResponseAsync().await() |
|
|
|