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 13, 2024
1 parent c4d5021 commit 52ca1da
Show file tree
Hide file tree
Showing 11 changed files with 6,137 additions and 3,229 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,785 changes: 4,896 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 52ca1da

Please sign in to comment.