|
|
@@ -1503,16 +1503,16 @@ const processIframeLinks = async () => {
|
|
|
// 如果无法获取contentWindow,使用HTML方式
|
|
|
let html = null
|
|
|
try {
|
|
|
- console.log(`getFile2 失败,尝试使用 getHTML:`, error2)
|
|
|
- try {
|
|
|
- html = await api.getHTML(iframeSrc)
|
|
|
- console.log('getHTML 成功获取内容:', html)
|
|
|
- }
|
|
|
- catch (htmlError) {
|
|
|
- console.error('getHTML 也失败:', htmlError)
|
|
|
- console.error('无法获取内容: getFile、getFile2 和 getHTML 都失败了')
|
|
|
- // throw new Error(`无法获取内容: getFile、getFile2 和 getHTML 都失败了`)
|
|
|
- }
|
|
|
+ console.log(`getFile2 失败,尝试使用 getHTML:`, error2)
|
|
|
+ try {
|
|
|
+ html = await api.getHTML(iframeSrc)
|
|
|
+ console.log('getHTML 成功获取内容:', html)
|
|
|
+ }
|
|
|
+ catch (htmlError) {
|
|
|
+ console.error('getHTML 也失败:', htmlError)
|
|
|
+ console.error('无法获取内容: getFile、getFile2 和 getHTML 都失败了')
|
|
|
+ // throw new Error(`无法获取内容: getFile、getFile2 和 getHTML 都失败了`)
|
|
|
+ }
|
|
|
}
|
|
|
catch (error) {
|
|
|
console.log(`getFile 失败,尝试使用 getFile2:`, error)
|