add title variable

This commit is contained in:
quenousimporte 2024-05-27 13:28:49 +02:00
parent 3ec36a4dab
commit 1155335bf1
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
// open https://journal.lemonde.fr, open an issue, hit f12 and find the GetPublicationContentItems url // open https://journal.lemonde.fr, open an issue, hit f12 and find the GetPublicationContentItems url
var url = "https://lmo-lmo-production-cdn.twipecloud.net/lmo/lmo/contentPackages/3761/GetPublicationContentItems-5274.json?v=20240524113722&Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbG1vLWxtby1wcm9kdWN0aW9uLWNkbi50d2lwZWNsb3VkLm5ldC9sbW8vbG1vL2NvbnRlbnRQYWNrYWdlcy8zNzYxLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3MTY1NTg4MzF9LCJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiMC4wLjAuMC8wIn0sIkRhdGVHcmVhdGVyVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzE2NTU2OTcxfX19XX0_&Signature=gfKT8bLNWoohcNqbvA7A~UKZMSLIJxLuPo5sJFtG1lmXwWfTl~3Y4RmgDn00uZ4VIW6uRJJFEIldrL9iBbUMY7LgtiDOpBxj5zPv-UBqN8mkxUkdd7OBPtAypz~7lByyx92or6VzOUzkMYEZ-ptPHVWyUon4Jv1BudMTxmWa1Vg_&Key-Pair-Id=APKAJZKKWCWU2JPGEHQQ"; var url = "https://lmo-lmo-production-cdn.twipecloud.net/lmo/lmo/contentPackages/3761/GetPublicationContentItems-5274.json?v=20240524113722&Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbG1vLWxtby1wcm9kdWN0aW9uLWNkbi50d2lwZWNsb3VkLm5ldC9sbW8vbG1vL2NvbnRlbnRQYWNrYWdlcy8zNzYxLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3MTY1NTg4MzF9LCJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiMC4wLjAuMC8wIn0sIkRhdGVHcmVhdGVyVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzE2NTU2OTcxfX19XX0_&Signature=gfKT8bLNWoohcNqbvA7A~UKZMSLIJxLuPo5sJFtG1lmXwWfTl~3Y4RmgDn00uZ4VIW6uRJJFEIldrL9iBbUMY7LgtiDOpBxj5zPv-UBqN8mkxUkdd7OBPtAypz~7lByyx92or6VzOUzkMYEZ-ptPHVWyUon4Jv1BudMTxmWa1Vg_&Key-Pair-Id=APKAJZKKWCWU2JPGEHQQ";
var booktitle = "Le Monde 28 mai";
var output = ""; var output = "";
var toc = ""; var toc = "";
@ -49,8 +50,8 @@ fetch(url)
} }
}); });
console.log("<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>Le Monde</title><style>.italic { font-style: italic; }</style></head><body>" console.log("<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>" + booktitle + "</title><style>.italic { font-style: italic; }</style></head><body>"
+ "<h1 id=\"main\">Le Monde</h1>" + (new Date).toLocaleString() + "<h1 id=\"main\">Sommaire</h1>"
+ "<div>" + toc + "</div>" + "<div>" + toc + "</div>"
+ output + output
+ "</body></html>"); + "</body></html>");