mirror of
https://github.com/dstark5/Openlib.git
synced 2025-07-04 05:40:17 +08:00
Fixed no mirror and download failed error
This commit is contained in:
@ -166,26 +166,24 @@ class AnnasArchieve {
|
|||||||
|
|
||||||
if (ul != null) {
|
if (ul != null) {
|
||||||
var anchorTags = [];
|
var anchorTags = [];
|
||||||
if (ul.length == 2) {
|
|
||||||
anchorTags = ul[1].querySelectorAll('a');
|
for (var e in ul) {
|
||||||
} else {
|
anchorTags.insertAll(0, e.querySelectorAll('a'));
|
||||||
anchorTags = ul[0].querySelectorAll('a');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var element in anchorTags) {
|
for (var element in anchorTags) {
|
||||||
if (element.attributes['href']!.startsWith('https://')) {
|
if (element.attributes['href'] != null &&
|
||||||
if (element.attributes['href'] != null &&
|
|
||||||
element.attributes['href'].startsWith('https://1lib.sk') !=
|
|
||||||
true) {
|
|
||||||
mirrors.add(element.attributes['href']!);
|
|
||||||
}
|
|
||||||
} else if (element.attributes['href'] != null &&
|
|
||||||
element.attributes['href']!.startsWith('/slow_download')) {
|
element.attributes['href']!.startsWith('/slow_download')) {
|
||||||
String? url = await _getMirrorLink(
|
String? url = await _getMirrorLink(
|
||||||
'$baseUrl${element.attributes['href']!}', userAgent, cookie);
|
'$baseUrl${element.attributes['href']!}', userAgent, cookie);
|
||||||
if (url != null && url.isNotEmpty) {
|
if (url != null && url.isNotEmpty) {
|
||||||
mirrors.add(url);
|
mirrors.add(url);
|
||||||
}
|
}
|
||||||
|
} else if (element.attributes['href']!.startsWith('https://')) {
|
||||||
|
if (element.attributes['href'] != null &&
|
||||||
|
element.attributes['href'].contains('ipfs') == true) {
|
||||||
|
mirrors.add(element.attributes['href']!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
|
|||||||
# https://github.com/flutter/flutter/issues/57146.
|
# https://github.com/flutter/flutter/issues/57146.
|
||||||
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
||||||
|
|
||||||
|
# Set fallback configurations for older versions of the flutter tool.
|
||||||
|
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
|
||||||
|
set(FLUTTER_TARGET_PLATFORM "windows-x64")
|
||||||
|
endif()
|
||||||
|
|
||||||
# === Flutter Library ===
|
# === Flutter Library ===
|
||||||
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
||||||
|
|
||||||
@ -92,7 +97,7 @@ add_custom_command(
|
|||||||
COMMAND ${CMAKE_COMMAND} -E env
|
COMMAND ${CMAKE_COMMAND} -E env
|
||||||
${FLUTTER_TOOL_ENVIRONMENT}
|
${FLUTTER_TOOL_ENVIRONMENT}
|
||||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
||||||
windows-x64 $<CONFIG>
|
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
add_custom_target(flutter_assemble DEPENDS
|
add_custom_target(flutter_assemble DEPENDS
|
||||||
|
Reference in New Issue
Block a user