Refactor URL checker script for better readability

This commit is contained in:
8man
2025-09-23 16:22:53 +05:30
committed by GitHub
parent 90f9593159
commit 99901a1e36

View File

@@ -175,10 +175,11 @@ async function main() {
fs.writeFileSync(FILE_PATH, jsonString); fs.writeFileSync(FILE_PATH, jsonString);
console.log(`✅ Updated ${FILE_PATH} with new URLs`); console.log(`✅ Updated ${FILE_PATH} with new URLs`);
// Output updated providers for Discord notification // Output updated providers for Discord notification in a clean format
if (updatedProviders.length > 0) { if (updatedProviders.length > 0) {
console.log("\n### UPDATED_PROVIDERS_START ###"); console.log("\n### UPDATED_PROVIDERS_START ###");
for (const provider of updatedProviders) { for (const provider of updatedProviders) {
// Format: name|oldUrl|newUrl (pipe-delimited for easy parsing)
console.log(`${provider.name}|${provider.oldUrl}|${provider.newUrl}`); console.log(`${provider.name}|${provider.oldUrl}|${provider.newUrl}`);
} }
console.log("### UPDATED_PROVIDERS_END ###"); console.log("### UPDATED_PROVIDERS_END ###");