fix dumb logging issue
This commit is contained in:
parent
0db95cad3d
commit
2dfa1cdbca
1 changed files with 9 additions and 2 deletions
|
|
@ -51,16 +51,23 @@ for (const {title} of itemPagesWithoutEDBIDs) {
|
|||
}
|
||||
console.log('EDB ID:', edbID, `(https://na.finalfantasyxiv.com/lodestone/playguide/db/item/${encodeURIComponent(edbID)})`);
|
||||
|
||||
let originalText;
|
||||
try {
|
||||
originalText = await mw.readPage(title);
|
||||
} catch (error) {
|
||||
console.log('Error reading page:', error);
|
||||
continue;
|
||||
}
|
||||
|
||||
// rewrite wiki page to include id-edb infobox parameter
|
||||
let updatedText;
|
||||
try {
|
||||
const originalText = await mw.readPage(title);
|
||||
updatedText = insertInfoboxEDBID(originalText, edbID);
|
||||
diff(originalText, updatedText);
|
||||
} catch (error) {
|
||||
console.log('Error inserting parameter:', error);
|
||||
console.group('Bad page content:');
|
||||
console.log(pageContent);
|
||||
console.log(originalText);
|
||||
console.groupEnd();
|
||||
console.log();
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue