Skip to content

Commit

Permalink
fix: nếu url không lấy được thì không dừng code
Browse files Browse the repository at this point in the history
  • Loading branch information
ooker777 committed Aug 12, 2024
1 parent c4d5021 commit 06ff81f
Show file tree
Hide file tree
Showing 10 changed files with 5,901 additions and 3,216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ export async function lấyHTML(url: Url) {
} else {
urlĐểFetch = url;
}
return await (await fetch(urlĐểFetch)).text();
try {
return await (await fetch(urlĐểFetch)).text();
} catch {
return `Không lấy được HTML cho ${urlĐểFetch}`;
}
}

export function tạoCorsURL(origin: string) {
Expand Down
7,753 changes: 4,864 additions & 2,889 deletions Cấu hình và dữ liệu/Danh sách bài đăng tạo trên local.json

Large diffs are not rendered by default.

Loading

0 comments on commit 06ff81f

Please sign in to comment.