Fix Repubblica sites (disable Googlebot)

master
magnolia1234 2021-10-26 18:28:57 +02:00
parent 27ae4a7498
commit e412b11b30
5 changed files with 7 additions and 7 deletions

View File

@ -30,7 +30,6 @@ const restrictions = {
'timesofindia.com': /.+\.timesofindia\.com\/($|toi-plus(\/.+)?|.+\.cms)/,
'nknews.org': /^((?!nknews\.org\/pro\/).)*$/,
'quora.com': /^((?!quora\.com\/search\?q=).)*$/,
'repubblica.it': /^((?!\/video\.repubblica\.it\/).)*$/,
'seekingalpha.com': /.+\/seekingalpha\.com\/($|(amp\/)?(article|news)\/|samw\/)/,
'statista.com': /^((?!\.statista\.com\/(outlook|study)\/).)*$/,
'techinasia.com': /\.techinasia\.com\/.+/,
@ -637,8 +636,6 @@ function add_grouped_sites(init_rules) {
}
for (let domain of it_repubblica_domains) {
allow_cookies.push(domain);
if (['gelocal.it', 'ilsecoloxix.it', 'repubblica.it'].includes(domain))
use_google_bot.push(domain);
blockedRegexes[domain] = /(scripts\.repubblica\.it\/pw\/pw\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|user-notification)-.+\.js)/;
}
for (let domain of nl_pg_domains) {

View File

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Chrome
Post-release
Fix Repubblica sites (disable Googlebot)
Fix Stratfor (forecasts)
Fix The Athletic (timing)
@ -18,7 +19,6 @@ Fix Financial Times (amp)
Fix Knack.be
Fix La Croix (timing)
Fix La Stampa (http error 403)
Fix The Athletic
Fix The Globe and Mail
Fix The New Yorker (homepage)
Fix Trouw.nl (timing)

View File

@ -2448,7 +2448,10 @@ else if (matchDomain('stratfor.com')) {
if (overview_div) {
let data = json.props.pageProps.data;
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize('<p>' + data.teaser_body + '</p>' + data.overview + '<p><h2>Sections</h2></p>' ) + '</div>', 'text/html');
let data_overview = data.overview;
if (!parseHtmlEntities(data_overview).includes(data.teaser_body))
data_overview = '<p>' + data.teaser_body + '</p>' + data_overview;
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(data_overview + '<p><h2>Sections</h2></p>') + '</div>', 'text/html');
let content_new = doc.querySelector('div');
let sections = data.section;
for (let section of sections) {

View File

@ -39,5 +39,5 @@
"webRequestBlocking",
"<all_urls>"
],
"version": "2.4.1.1"
"version": "2.4.1.2"
}

View File

@ -544,5 +544,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.4.1.1"
"version": "2.4.1.2"
}