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 18, 2024
1 parent c4d5021 commit d42c6b6
Show file tree
Hide file tree
Showing 13 changed files with 8,251 additions and 4,837 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
11,363 changes: 6,845 additions & 4,518 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 d42c6b6

Please sign in to comment.