Fix-update The West Australian (timing)

This commit is contained in:
magnolia1234 2020-10-22 16:37:54 +02:00
parent ab605cf816
commit b5588da005
2 changed files with 7 additions and 1 deletions

View file

@ -6,6 +6,7 @@ Add Foreign Affairs
Add Il Resto del Carlino (Italy)
Add The Logic (Canada)
Add The New York Review of Books
Fix-update The West Australian (timing)
Fix-update Funke Medien (TinyPass)
Fix bug in NY Times (hidden iframe-content)

View file

@ -100,7 +100,12 @@ else if (window.location.hostname.endsWith(".com.au") || window.location.hostnam
let json_text = json_script.innerHTML.split('window.PAGE_DATA =')[1].split('</script')[0];
json_text = json_text.replace(/undefined/g, '"undefined"');
let json_article = JSON.parse(json_text);
let json_pub = Object.entries(json_article)[0][1].data.result.resolution.publication;
let json_pub;
for (let key in json_article)
if (json_article[key].data.result.resolution && json_article[key].data.result.resolution.publication) {
json_pub = json_article[key].data.result.resolution.publication;
continue;
}
let json_content = json_pub.content.blocks;
//let json_video = json_pub.mainVideo;
let url = window.location.href;